vector<T, int N>.init

Description

Initialize a vector where all elements have the same scalar value.

Signature

vector<T, int N>.init(T value);

vector<T, int N>.init(vector<T, N> value);

vector<T, N>.init(int v)
    where T : __BuiltinIntegerType;

vector<T, N>.init(int64_t v)
    where T : __BuiltinIntegerType;

vector<T, N>.init<U>(vector<U, N> other)
    where U : __BuiltinFloatingPointType
    where T : __BuiltinIntegerType;

vector<T, N>.init<U>(vector<U, N> other)
    where U : __BuiltinIntegerType
    where T : __BuiltinIntegerType;

vector<T, N>.init<U>(vector<U, N> other)
    where U : IFloatingPointCoopElement
    where T : IFloatingPointCoopElement;

vector<T, N>.init<U>(vector<U, N> other)
    where U : __BuiltinFloatingPointType
    where T : __BuiltinFloatingPointType;

vector<T, N>.init<U>(vector<U, N> other)
    where U : __BuiltinIntegerType
    where T : __BuiltinFloatingPointType;

vector<T, N>.init(int v)
    where T : __BuiltinFloatingPointType;

vector<T, N>.init(float v)
    where T : __BuiltinFloatingPointType;

vector<T, N>.init<int L>(matrix<T, 2, 2> value)
    where N == 4;

vector<T, N>.init(
    T x,
    T y)
    where N == 2;

vector<T, N>.init(
    T x,
    T y,
    T z)
    where N == 3;

vector<T, N>.init(
    vector<T, 2> xy,
    T z)
    where N == 3;

vector<T, N>.init(
    T x,
    vector<T, 2> yz)
    where N == 3;

vector<T, N>.init(
    T x,
    T y,
    T z,
    T w)
    where N == 4;

vector<T, N>.init(
    vector<T, 2> xy,
    T z,
    T w)
    where N == 4;

vector<T, N>.init(
    T x,
    vector<T, 2> yz,
    T w)
    where N == 4;

vector<T, N>.init(
    T x,
    T y,
    vector<T, 2> zw)
    where N == 4;

vector<T, N>.init(
    vector<T, 2> xy,
    vector<T, 2> zw)
    where N == 4;

vector<T, N>.init(
    vector<T, 3> xyz,
    T w)
    where N == 4;

vector<T, N>.init(
    T x,
    vector<T, 3> yzw)
    where N == 4;

vector<T, N>.init(half x)
    where T == half;

vector<T, N>.init(float x)
    where T == float;

vector<T, N>.init(int x)
    where T == int;

vector<T, N>.init(uint x)
    where T == uint;

vector<T, N>.init(int8_t x)
    where T == int8_t;

vector<T, N>.init(int16_t x)
    where T == int16_t;

vector<T, N>.init(uint8_t x)
    where T == uint8_t;

vector<T, N>.init(uint16_t x)
    where T == uint16_t;

vector<T, N>.init(double x)
    where T == double
    where N == 2;

vector<T, N>.init(uint64_t x)
    where T == uint64_t
    where N == 2;

vector<T, N>.init(int64_t x)
    where T == int64_t
    where N == 2;

vector<T, N>.init<T>(DescriptorHandle<T> bindless)
    where T : IOpaqueDescriptor
    where T == uint
    where N == 2;

Generic Parameters

U: __BuiltinFloatingPointType

U: __BuiltinIntegerType

U: IFloatingPointCoopElement

L : int

T: IOpaqueDescriptor

Parameters

value : T

value : vector<T, N>

v : int

v : int64_t

other : vector<U, N>

v : float

value : matrix<T, 2, 2>

x : T

y : T

z : T

xy : vector<T, 2>

yz : vector<T, 2>

w : T

zw : vector<T, 2>

xyz : vector<T, 3>

yzw : vector<T, 3>

x : half

x : float

x : int

x : uint

x : int8_t

x : int16_t

x : uint8_t

x : uint16_t

x : double

x : uint64_t

x : int64_t

bindless : DescriptorHandle<T>

Availability and Requirements

Defined for the following targets:

hlsl

Available in all stages.

glsl

Available in all stages.

wgsl

Available in all stages.

spirv

Available in all stages.