Vector128.CreateScalar Method

Definition

Overloads

CreateScalar(UIntPtr)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(UInt64)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(UInt32)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(UInt16)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(SByte)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Single)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Int64)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Int32)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Int16)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Double)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Byte)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(IntPtr)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar<T>(T)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(UIntPtr)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Important

This API is not CLS-compliant.

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
[System.CLSCompliant(false)]
public static System.Runtime.Intrinsics.Vector128<UIntPtr> CreateScalar(UIntPtr value);

Parameters

value
UIntPtr

The value that element 0 will be initialized to.

Returns

Vector128<UIntPtr>

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Attributes

Applies to

.NET 10 and other versions
Product Versions
.NET 7, 8, 9, 10

CreateScalar(UInt64)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Important

This API is not CLS-compliant.

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
[System.CLSCompliant(false)]
public static System.Runtime.Intrinsics.Vector128<ulong> CreateScalar(ulong value);

Parameters

value
UInt64

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Attributes

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CreateScalar(UInt32)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Important

This API is not CLS-compliant.

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
[System.CLSCompliant(false)]
public static System.Runtime.Intrinsics.Vector128<uint> CreateScalar(uint value);

Parameters

value
UInt32

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Attributes

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CreateScalar(UInt16)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Important

This API is not CLS-compliant.

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
[System.CLSCompliant(false)]
public static System.Runtime.Intrinsics.Vector128<ushort> CreateScalar(ushort value);

Parameters

value
UInt16

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Attributes

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CreateScalar(SByte)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Important

This API is not CLS-compliant.

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
[System.CLSCompliant(false)]
public static System.Runtime.Intrinsics.Vector128<sbyte> CreateScalar(sbyte value);

Parameters

value
SByte

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Attributes

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CreateScalar(Single)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
public static System.Runtime.Intrinsics.Vector128<float> CreateScalar(float value);

Parameters

value
Single

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CreateScalar(Int64)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
public static System.Runtime.Intrinsics.Vector128<long> CreateScalar(long value);

Parameters

value
Int64

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CreateScalar(Int32)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
public static System.Runtime.Intrinsics.Vector128<int> CreateScalar(int value);

Parameters

value
Int32

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CreateScalar(Int16)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
public static System.Runtime.Intrinsics.Vector128<short> CreateScalar(short value);

Parameters

value
Int16

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CreateScalar(Double)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
public static System.Runtime.Intrinsics.Vector128<double> CreateScalar(double value);

Parameters

value
Double

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CreateScalar(Byte)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
public static System.Runtime.Intrinsics.Vector128<byte> CreateScalar(byte value);

Parameters

value
Byte

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10

CreateScalar(IntPtr)

Source:
Vector128.cs
Source:
Vector128.cs
Source:
Vector128.cs

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
public static System.Runtime.Intrinsics.Vector128<IntPtr> CreateScalar(IntPtr value);

Parameters

value
IntPtr

The value that element 0 will be initialized to.

Returns

Vector128<IntPtr>

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Applies to

.NET 10 and other versions
Product Versions
.NET 7, 8, 9, 10

CreateScalar<T>(T)

Source:
Vector128.cs
Source:
Vector128.cs

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

C#
public static System.Runtime.Intrinsics.Vector128<T> CreateScalar<T>(T value);

Type Parameters

T

The type of the elements in the vector.

Parameters

value
T

The value that element 0 will be initialized to.

Returns

A new Vector128<T> instance with the first element initialized to value and the remaining elements initialized to zero.

Exceptions

The type of value (T) is not supported.

Applies to

.NET 10 and other versions
Product Versions
.NET 8, 9, 10