simdpp::make_int

From libsimdpp-docs
template<class V>
V make_int( int64_t v0 );
(1)
template<class V>
V make_int( int64_t v0, int64_t v1 );
(1)
template<class V>
V make_int( int64_t v0, int64_t v1, int64_t v2, int64_t v3 );
(1)
template<class V>
V make_int( int64_t v0, int64_t v1, ... , int64_t v7 );
(1)
template<class V>
V make_int( int64_t v0, int64_t v1, ... , int64_t v15 );
(1)
_DETAIL_ make_int( int64_t v0 );
(2)
_DETAIL_ make_int( int64_t v0, int64_t v1 );
(2)
_DETAIL_ make_int( int64_t v0, int64_t v1, int64_t v2, int64_t v3 );
(2)
_DETAIL_ make_int( int64_t v0, int64_t v1, ... , int64_t v7 );
(2)
_DETAIL_ make_int( int64_t v0, int64_t v1, ... , int64_t v15 );
(2)

Creates a vector from unsigned integer values known at compile-time.

The values passed to this function are converted using standard conversions to the element type of the resulting vector. All conversions and other overhead is performed at compile-time thus even if the minimal optimization level is selected, the function results in a simple load from memory.

The function is not guaranteed to have adequate performance if the arguments are not known at compile-time.

If the vector has fewer elements than the number of the parameters this function accepts then the extra values are discarded.

The first set of overloads loads to given non-mask vector type.

The second set of overloads returns a value of unspecified type with which any non-mask vector can be initialized. E.g. int32<4> x = make_int(1, 2, 3, 4);

Parameters[edit]

v0, ..., v15 - the values to initialize the vector to

Return value[edit]

(1) Vector that contains the given values.

(2) An value of unspecified type that can initialize a vector with the given values as if the first version of the function was executed.

Equivalent operation[edit]

1 parameter version

r = [ v0 v0 v0 v0 ... v0 ]

2 parameters version

r = [ v0 v1 v0 v1 ... v1 ]

4 parameters version

r = [ v0 v1 v2 v3 ... v3 ]

8 parameters version

r = [ v0 v1 .. v7 v0  ... v7 ]

See also[edit]