HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
simd.h File Reference

Classes for SIMD processing. More...

#include <algorithm>
#include <cstring>
#include <OpenImageIO/Imath.h>
#include <OpenImageIO/dassert.h>
#include <OpenImageIO/platform.h>
+ Include dependency graph for simd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  simd::simd_raw_t< T, N >
 
struct  simd::simd_raw_t< T, N >::type
 
struct  simd::simd_bool_t< N >
 
struct  simd::simd_bool_t< N >::type
 
struct  simd::simd_bool_t< 16 >
 
struct  simd::VecType< T, elements >
 
struct  simd::VecType< int, 1 >
 
struct  simd::VecType< float, 1 >
 
struct  simd::VecType< int, 4 >
 
struct  simd::VecType< float, 4 >
 
struct  simd::VecType< float, 3 >
 
struct  simd::VecType< bool, 4 >
 
struct  simd::VecType< int, 8 >
 
struct  simd::VecType< float, 8 >
 
struct  simd::VecType< bool, 8 >
 
struct  simd::VecType< int, 16 >
 
struct  simd::VecType< float, 16 >
 
struct  simd::VecType< bool, 16 >
 
struct  simd::SimdSize< T >
 
struct  simd::SimdSize< vint4 >
 
struct  simd::SimdSize< vfloat4 >
 
struct  simd::SimdSize< vfloat3 >
 
struct  simd::SimdSize< vbool4 >
 
struct  simd::SimdSize< vint8 >
 
struct  simd::SimdSize< vfloat8 >
 
struct  simd::SimdSize< vbool8 >
 
struct  simd::SimdSize< vint16 >
 
struct  simd::SimdSize< vfloat16 >
 
struct  simd::SimdSize< vbool16 >
 
struct  simd::SimdElements< T >
 
struct  simd::SimdElements< vfloat3 >
 
struct  simd::SimdTypeName< T >
 Template giving a printable name for each type. More...
 
struct  simd::SimdTypeName< vfloat4 >
 
struct  simd::SimdTypeName< vint4 >
 
struct  simd::SimdTypeName< vbool4 >
 
struct  simd::SimdTypeName< vfloat8 >
 
struct  simd::SimdTypeName< vint8 >
 
struct  simd::SimdTypeName< vbool8 >
 
struct  simd::SimdTypeName< vfloat16 >
 
struct  simd::SimdTypeName< vint16 >
 
struct  simd::SimdTypeName< vbool16 >
 
class  simd::vbool4
 
class  simd::vbool8
 
class  simd::vbool16
 
class  simd::vint4
 Integer 4-vector, accelerated by SIMD instructions when available. More...
 
class  simd::vint8
 Integer 8-vector, accelerated by SIMD instructions when available. More...
 
class  simd::vint16
 Integer 16-vector, accelerated by SIMD instructions when available. More...
 
class  simd::vfloat4
 
class  simd::vfloat3
 
class  simd::matrix44
 
class  simd::vfloat8
 
class  simd::vfloat16
 

Namespaces

 simd
 

Macros

#define OIIO_SIMD_SSE   0
 
#define OIIO_SIMD_AVX   0
 
#define OIIO_AVX512VL_ENABLED   0
 
#define OIIO_AVX512DQ_ENABLED   0
 
#define OIIO_AVX512PF_ENABLED   0
 
#define OIIO_AVX512ER_ENABLED   0
 
#define OIIO_AVX512CD_ENABLED   0
 
#define OIIO_AVX512BW_ENABLED   0
 
#define OIIO_FMA_ENABLED   0
 
#define OIIO_AVX512IFMA_ENABLED   0
 
#define OIIO_F16C_ENABLED   0
 
#define OIIO_SIMD_NEON   0
 
#define OIIO_SIMD   0
 
#define OIIO_SIMD4_ALIGN
 
#define OIIO_SIMD_MAX_SIZE_BYTES   16
 
#define OIIO_SIMD8_ALIGN   OIIO_SIMD4_ALIGN
 
#define OIIO_SIMD16_ALIGN   OIIO_SIMD8_ALIGN
 
#define OIIO_SIMD_HAS_MATRIX4   1 /* matrix44 defined */
 
#define OIIO_SIMD_HAS_FLOAT8   1 /* DEPRECATED(1.8) */
 
#define OIIO_SIMD_HAS_SIMD8   1 /* vfloat8, vint8, vbool8 defined */
 
#define OIIO_SIMD_HAS_SIMD16   1 /* vfloat16, vint16, vbool16 defined */
 
#define OIIO_SIMD_FLOAT4_CONST(name, val)   static const OIIO_SIMD4_ALIGN float name[4] = { (val), (val), (val), (val) }
 
#define OIIO_SIMD_FLOAT4_CONST4(name, v0, v1, v2, v3)   static const OIIO_SIMD4_ALIGN float name[4] = { (v0), (v1), (v2), (v3) }
 
#define OIIO_SIMD_INT4_CONST(name, val)   static const OIIO_SIMD4_ALIGN int name[4] = { (val), (val), (val), (val) }
 
#define OIIO_SIMD_INT4_CONST4(name, v0, v1, v2, v3)   static const OIIO_SIMD4_ALIGN int name[4] = { (v0), (v1), (v2), (v3) }
 
#define OIIO_SIMD_UINT4_CONST(name, val)   static const OIIO_SIMD4_ALIGN uint32_t name[4] = { (val), (val), (val), (val) }
 
#define OIIO_SIMD_UINT4_CONST4(name, v0, v1, v2, v3)   static const OIIO_SIMD4_ALIGN uint32_t name[4] = { (v0), (v1), (v2), (v3) }
 
#define OIIO_SIMD_FLOAT8_CONST(name, val)
 
#define OIIO_SIMD_FLOAT8_CONST8(name, v0, v1, v2, v3, v4, v5, v6, v7)
 
#define OIIO_SIMD_INT8_CONST(name, val)
 
#define OIIO_SIMD_INT8_CONST8(name, v0, v1, v2, v3, v4, v5, v6, v7)
 
#define OIIO_SIMD_UINT8_CONST(name, val)
 
#define OIIO_SIMD_UINT8_CONST8(name, v0, v1, v2, v3, v4, v5, v6, v7)
 
#define OIIO_SIMD_VFLOAT16_CONST(name, val)
 
#define OIIO_SIMD_VFLOAT16_CONST16(name, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15)
 
#define OIIO_SIMD_INT16_CONST(name, val)
 
#define OIIO_SIMD_INT16_CONST16(name, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15)
 
#define OIIO_SIMD_UINT16_CONST(name, val)
 
#define OIIO_SIMD_UINT16_CONST16(name, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15)
 
#define SIMD_DO(x)   for (int i = 0; i < elements; ++i) x
 
#define SIMD_CONSTRUCT(x)   for (int i = 0; i < elements; ++i) m_val[i] = (x)
 
#define SIMD_CONSTRUCT_PAD(x)
 
#define SIMD_RETURN(T, x)   T r; for (int i = 0; i < r.elements; ++i) r[i] = (x); return r
 
#define SIMD_RETURN_REDUCE(T, init, op)   T r = init; for (int i = 0; i < v.elements; ++i) op; return r
 

Typedefs

typedef vbool4 simd::mask4
 
typedef vbool4 simd::bool4
 
typedef vbool8 simd::bool8
 
typedef vint4 simd::int4
 
typedef vint8 simd::int8
 
typedef vfloat3 simd::float3
 
typedef vfloat4 simd::float4
 
typedef vfloat8 simd::float8
 

Functions

template<int i0, int i1, int i2, int i3>
OIIO_FORCEINLINE vbool4 simd::shuffle (const vbool4 &a)
 
template<int i>
OIIO_FORCEINLINE vbool4 simd::shuffle (const vbool4 &a)
 shuffle<i>(a) is the same as shuffle<i,i,i,i>(a) More...
 
template<int i>
OIIO_FORCEINLINE bool simd::extract (const vbool4 &a)
 
template<int i>
OIIO_FORCEINLINE vbool4 simd::insert (const vbool4 &a, bool val)
 Helper: substitute val for a[i]. More...
 
bool simd::reduce_and (const vbool4 &v)
 Logical reduction across all components. More...
 
bool simd::reduce_or (const vbool4 &v)
 
bool simd::all (const vbool4 &v)
 
bool simd::any (const vbool4 &v)
 
bool simd::none (const vbool4 &v)
 
bool simd::all (bool v)
 
template<int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7>
OIIO_FORCEINLINE vbool8 simd::shuffle (const vbool8 &a)
 
template<int i>
OIIO_FORCEINLINE vbool8 simd::shuffle (const vbool8 &a)
 shuffle<i>(a) is the same as shuffle<i,i,i,i>(a) More...
 
template<int i>
OIIO_FORCEINLINE bool simd::extract (const vbool8 &a)
 
template<int i>
OIIO_FORCEINLINE vbool8 simd::insert (const vbool8 &a, bool val)
 Helper: substitute val for a[i]. More...
 
bool simd::reduce_and (const vbool8 &v)
 Logical reduction across all components. More...
 
bool simd::reduce_or (const vbool8 &v)
 
bool simd::all (const vbool8 &v)
 
bool simd::any (const vbool8 &v)
 
bool simd::none (const vbool8 &v)
 
template<int i>
OIIO_FORCEINLINE bool simd::extract (const vbool16 &a)
 
template<int i>
OIIO_FORCEINLINE vbool16 simd::insert (const vbool16 &a, bool val)
 Helper: substitute val for a[i]. More...
 
bool simd::reduce_and (const vbool16 &v)
 Logical reduction across all components. More...
 
bool simd::reduce_or (const vbool16 &v)
 
bool simd::all (const vbool16 &v)
 
bool simd::any (const vbool16 &v)
 
bool simd::none (const vbool16 &v)
 
vint4 simd::srl (const vint4 &val, const unsigned int bits)
 
template<int i0, int i1, int i2, int i3>
OIIO_FORCEINLINE vint4 simd::shuffle (const vint4 &a)
 
template<int i>
OIIO_FORCEINLINE vint4 simd::shuffle (const vint4 &a)
 shuffle<i>(a) is the same as shuffle<i,i,i,i>(a) More...
 
template<int i>
OIIO_FORCEINLINE int simd::extract (const vint4 &v)
 
vint4 simd::vreduce_add (const vint4 &v)
 The sum of all components, returned in all components. More...
 
int simd::reduce_add (const vint4 &v)
 
int simd::reduce_and (const vint4 &v)
 
int simd::reduce_or (const vint4 &v)
 
vint4 simd::blend (const vint4 &a, const vint4 &b, const vbool4 &mask)
 
vint4 simd::blend0 (const vint4 &a, const vbool4 &mask)
 
vint4 simd::blend0not (const vint4 &a, const vbool4 &mask)
 
vint4 simd::select (const vbool4 &mask, const vint4 &a, const vint4 &b)
 
vint4 simd::abs (const vint4 &a)
 
vint4 simd::min (const vint4 &a, const vint4 &b)
 
vint4 simd::max (const vint4 &a, const vint4 &b)
 
vint4 simd::rotl (const vint4 &x, const int s)
 Circular bit rotate by s bits, for N values at once. More...
 
vint4 simd::rotl32 (const vint4 &x, const unsigned int k)
 
vint4 simd::andnot (const vint4 &a, const vint4 &b)
 andnot(a,b) returns ((~a) & b) More...
 
vint4 simd::bitcast_to_int (const vbool4 &x)
 Bitcast back and forth to intN (not a convert – move the bits!) More...
 
vint4 simd::bitcast_to_int (const vfloat4 &x)
 
vfloat4 simd::bitcast_to_float (const vint4 &x)
 
void simd::transpose (vint4 &a, vint4 &b, vint4 &c, vint4 &d)
 
void simd::transpose (const vint4 &a, const vint4 &b, const vint4 &c, const vint4 &d, vint4 &r0, vint4 &r1, vint4 &r2, vint4 &r3)
 
vint4 simd::AxBxCxDx (const vint4 &a, const vint4 &b, const vint4 &c, const vint4 &d)
 
vint4 simd::safe_mod (const vint4 &a, const vint4 &b)
 
vint4 simd::safe_mod (const vint4 &a, int b)
 
vint8 simd::srl (const vint8 &val, const unsigned int bits)
 
template<int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7>
OIIO_FORCEINLINE vint8 simd::shuffle (const vint8 &a)
 
template<int i>
OIIO_FORCEINLINE vint8 simd::shuffle (const vint8 &a)
 shuffle<i>(a) is the same as shuffle<i,i,i,i>(a) More...
 
template<int i>
OIIO_FORCEINLINE int simd::extract (const vint8 &v)
 
template<int i>
OIIO_FORCEINLINE vint8 simd::insert (const vint8 &a, int val)
 Helper: substitute val for a[i]. More...
 
vint8 simd::vreduce_add (const vint8 &v)
 The sum of all components, returned in all components. More...
 
int simd::reduce_add (const vint8 &v)
 
int simd::reduce_and (const vint8 &v)
 
int simd::reduce_or (const vint8 &v)
 
vint8 simd::blend (const vint8 &a, const vint8 &b, const vbool8 &mask)
 
vint8 simd::blend0 (const vint8 &a, const vbool8 &mask)
 
vint8 simd::blend0not (const vint8 &a, const vbool8 &mask)
 
vint8 simd::select (const vbool8 &mask, const vint8 &a, const vint8 &b)
 
vint8 simd::abs (const vint8 &a)
 
vint8 simd::min (const vint8 &a, const vint8 &b)
 
vint8 simd::max (const vint8 &a, const vint8 &b)
 
vint8 simd::rotl (const vint8 &x, const int s)
 Circular bit rotate by s bits, for N values at once. More...
 
vint8 simd::rotl32 (const vint8 &x, const unsigned int k)
 
vint8 simd::andnot (const vint8 &a, const vint8 &b)
 andnot(a,b) returns ((~a) & b) More...
 
vint8 simd::bitcast_to_int (const vbool8 &x)
 Bitcast back and forth to intN (not a convert – move the bits!) More...
 
vint8 simd::bitcast_to_int (const vfloat8 &x)
 
vfloat8 simd::bitcast_to_float (const vint8 &x)
 
vint8 simd::safe_mod (const vint8 &a, const vint8 &b)
 
vint8 simd::safe_mod (const vint8 &a, int b)
 
vint16 simd::srl (const vint16 &val, const unsigned int bits)
 
template<int i0, int i1, int i2, int i3>
vint16 simd::shuffle4 (const vint16 &a)
 Shuffle groups of 4. More...
 
template<int i>
vint16 simd::shuffle4 (const vint16 &a)
 shuffle4<i>(a) is the same as shuffle4<i,i,i,i>(a) More...
 
template<int i0, int i1, int i2, int i3>
vint16 simd::shuffle (const vint16 &a)
 Shuffle within each group of 4. More...
 
template<int i>
vint16 simd::shuffle (const vint16 &a)
 shuffle<i>(a) is the same as shuffle<i,i,i,i>(a) More...
 
template<int i>
OIIO_FORCEINLINE int simd::extract (const vint16 &v)
 
template<int i>
OIIO_FORCEINLINE vint16 simd::insert (const vint16 &a, int val)
 Helper: substitute val for a[i]. More...
 
vint16 simd::vreduce_add (const vint16 &v)
 The sum of all components, returned in all components. More...
 
int simd::reduce_add (const vint16 &v)
 
int simd::reduce_and (const vint16 &v)
 
int simd::reduce_or (const vint16 &v)
 
vint16 simd::blend (const vint16 &a, const vint16 &b, const vbool16 &mask)
 
vint16 simd::blend0 (const vint16 &a, const vbool16 &mask)
 
vint16 simd::blend0not (const vint16 &a, const vbool16 &mask)
 
vint16 simd::select (const vbool16 &mask, const vint16 &a, const vint16 &b)
 
vint16 simd::abs (const vint16 &a)
 
vint16 simd::min (const vint16 &a, const vint16 &b)
 
vint16 simd::max (const vint16 &a, const vint16 &b)
 
vint16 simd::rotl (const vint16 &x, const int s)
 Circular bit rotate by s bits, for N values at once. More...
 
vint16 simd::rotl32 (const vint16 &x, const unsigned int k)
 
vint16 simd::andnot (const vint16 &a, const vint16 &b)
 andnot(a,b) returns ((~a) & b) More...
 
vint16 simd::bitcast_to_int (const vbool16 &x)
 Bitcast back and forth to intN (not a convert – move the bits!) More...
 
vint16 simd::bitcast_to_int (const vfloat16 &x)
 
vfloat16 simd::bitcast_to_float (const vint16 &x)
 
vint16 simd::safe_mod (const vint16 &a, const vint16 &b)
 
vint16 simd::safe_mod (const vint16 &a, int b)
 
template<int i0, int i1, int i2, int i3>
OIIO_FORCEINLINE vfloat4 simd::shuffle (const vfloat4 &a)
 
template<int i>
OIIO_FORCEINLINE vfloat4 simd::shuffle (const vfloat4 &a)
 shuffle<i>(a) is the same as shuffle<i,i,i,i>(a) More...
 
template<int i>
OIIO_FORCEINLINE float simd::extract (const vfloat4 &a)
 
template<int i>
OIIO_FORCEINLINE vfloat4 simd::insert (const vfloat4 &a, float val)
 Helper: substitute val for a[i]. More...
 
vfloat4 simd::vreduce_add (const vfloat4 &v)
 The sum of all components, returned in all components. More...
 
float simd::reduce_add (const vfloat4 &v)
 The sum of all components, returned as a scalar. More...
 
vfloat4 simd::vdot (const vfloat4 &a, const vfloat4 &b)
 Return the float dot (inner) product of a and b in every component. More...
 
float simd::dot (const vfloat4 &a, const vfloat4 &b)
 Return the float dot (inner) product of a and b. More...
 
vfloat4 simd::vdot3 (const vfloat4 &a, const vfloat4 &b)
 
float simd::dot3 (const vfloat4 &a, const vfloat4 &b)
 Return the float 3-component dot (inner) product of a and b. More...
 
vfloat4 simd::blend (const vfloat4 &a, const vfloat4 &b, const vbool4 &mask)
 
vfloat4 simd::blend0 (const vfloat4 &a, const vbool4 &mask)
 
vfloat4 simd::blend0not (const vfloat4 &a, const vbool4 &mask)
 
vfloat4 simd::safe_div (const vfloat4 &a, const vfloat4 &b)
 
vfloat3 simd::hdiv (const vfloat4 &a)
 Homogeneous divide to turn a vfloat4 into a vfloat3. More...
 
vfloat4 simd::select (const vbool4 &mask, const vfloat4 &a, const vfloat4 &b)
 
vfloat4 simd::abs (const vfloat4 &a)
 absolute value (float) More...
 
vfloat4 simd::sign (const vfloat4 &a)
 1.0 when value >= 0, -1 when negative More...
 
vfloat4 simd::ceil (const vfloat4 &a)
 
vfloat4 simd::floor (const vfloat4 &a)
 
vint4 simd::ifloor (const vfloat4 &a)
 (int)floor More...
 
vint4 simd::floori (const vfloat4 &a)
 
vfloat4 simd::round (const vfloat4 &a)
 
vint4 simd::rint (const vfloat4 &a)
 
vfloat4 simd::rcp_fast (const vfloat4 &a)
 Fast, approximate 1/a. More...
 
vfloat4 simd::sqrt (const vfloat4 &a)
 
vfloat4 simd::rsqrt (const vfloat4 &a)
 Fully accurate 1/sqrt. More...
 
vfloat4 simd::rsqrt_fast (const vfloat4 &a)
 Fast, approximate 1/sqrt. More...
 
vfloat4 simd::min (const vfloat4 &a, const vfloat4 &b)
 Per-element min. More...
 
vfloat4 simd::max (const vfloat4 &a, const vfloat4 &b)
 Per-element max. More...
 
template<typename T >
OIIO_FORCEINLINEsimd::exp (const T &v)
 
template<typename T >
OIIO_FORCEINLINEsimd::log (const T &v)
 
vfloat4 simd::andnot (const vfloat4 &a, const vfloat4 &b)
 andnot(a,b) returns ((~a) & b) More...
 
vfloat4 simd::madd (const vfloat4 &a, const vfloat4 &b, const vfloat4 &c)
 
vfloat4 simd::msub (const vfloat4 &a, const vfloat4 &b, const vfloat4 &c)
 
vfloat4 simd::nmadd (const vfloat4 &a, const vfloat4 &b, const vfloat4 &c)
 
vfloat4 simd::nmsub (const vfloat4 &a, const vfloat4 &b, const vfloat4 &c)
 
void simd::transpose (vfloat4 &a, vfloat4 &b, vfloat4 &c, vfloat4 &d)
 
void simd::transpose (const vfloat4 &a, const vfloat4 &b, const vfloat4 &c, const vfloat4 &d, vfloat4 &r0, vfloat4 &r1, vfloat4 &r2, vfloat4 &r3)
 
vfloat4 simd::AxBxCxDx (const vfloat4 &a, const vfloat4 &b, const vfloat4 &c, const vfloat4 &d)
 Make a vfloat4 consisting of the first element of each of 4 vfloat4's. More...
 
vfloat3 simd::abs (const vfloat3 &a)
 
vfloat3 simd::sign (const vfloat3 &a)
 
vfloat3 simd::ceil (const vfloat3 &a)
 
vfloat3 simd::floor (const vfloat3 &a)
 
vfloat3 simd::round (const vfloat3 &a)
 
vfloat3 simd::transformp (const matrix44 &M, const vfloat3 &V)
 Transform 3-point V by 4x4 matrix M. More...
 
vfloat3 simd::transformp (const Imath::M44f &M, const vfloat3 &V)
 
vfloat3 simd::transformv (const matrix44 &M, const vfloat3 &V)
 Transform 3-vector V by 4x4 matrix M. More...
 
vfloat3 simd::transformv (const Imath::M44f &M, const vfloat3 &V)
 
vfloat3 simd::transformvT (const matrix44 &M, const vfloat3 &V)
 
vfloat3 simd::transformvT (const Imath::M44f &M, const vfloat3 &V)
 
template<int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7>
OIIO_FORCEINLINE vfloat8 simd::shuffle (const vfloat8 &a)
 
template<int i>
OIIO_FORCEINLINE vfloat8 simd::shuffle (const vfloat8 &a)
 shuffle<i>(a) is the same as shuffle<i,i,i,i,...>(a) More...
 
template<int i>
OIIO_FORCEINLINE float simd::extract (const vfloat8 &a)
 
template<int i>
OIIO_FORCEINLINE vfloat8 simd::insert (const vfloat8 &a, float val)
 Helper: substitute val for a[i]. More...
 
vfloat8 simd::vreduce_add (const vfloat8 &v)
 The sum of all components, returned in all components. More...
 
float simd::reduce_add (const vfloat8 &v)
 The sum of all components, returned as a scalar. More...
 
vfloat8 simd::vdot (const vfloat8 &a, const vfloat8 &b)
 Return the float dot (inner) product of a and b in every component. More...
 
float simd::dot (const vfloat8 &a, const vfloat8 &b)
 Return the float dot (inner) product of a and b. More...
 
vfloat8 simd::vdot3 (const vfloat8 &a, const vfloat8 &b)
 
float simd::dot3 (const vfloat8 &a, const vfloat8 &b)
 Return the float 3-component dot (inner) product of a and b. More...
 
vfloat8 simd::blend (const vfloat8 &a, const vfloat8 &b, const vbool8 &mask)
 
vfloat8 simd::blend0 (const vfloat8 &a, const vbool8 &mask)
 
vfloat8 simd::blend0not (const vfloat8 &a, const vbool8 &mask)
 
vfloat8 simd::safe_div (const vfloat8 &a, const vfloat8 &b)
 
vfloat8 simd::select (const vbool8 &mask, const vfloat8 &a, const vfloat8 &b)
 
vfloat8 simd::abs (const vfloat8 &a)
 absolute value (float) More...
 
vfloat8 simd::sign (const vfloat8 &a)
 1.0 when value >= 0, -1 when negative More...
 
vfloat8 simd::ceil (const vfloat8 &a)
 
vfloat8 simd::floor (const vfloat8 &a)
 
vint8 simd::ifloor (const vfloat8 &a)
 (int)floor More...
 
vint8 simd::floori (const vfloat8 &a)
 
vfloat8 simd::round (const vfloat8 &a)
 
vint8 simd::rint (const vfloat8 &a)
 
vfloat8 simd::rcp_fast (const vfloat8 &a)
 Fast, approximate 1/a. More...
 
vfloat8 simd::sqrt (const vfloat8 &a)
 
vfloat8 simd::rsqrt (const vfloat8 &a)
 Fully accurate 1/sqrt. More...
 
vfloat8 simd::rsqrt_fast (const vfloat8 &a)
 Fast, approximate 1/sqrt. More...
 
vfloat8 simd::min (const vfloat8 &a, const vfloat8 &b)
 Per-element min. More...
 
vfloat8 simd::max (const vfloat8 &a, const vfloat8 &b)
 Per-element max. More...
 
vfloat8 simd::andnot (const vfloat8 &a, const vfloat8 &b)
 andnot(a,b) returns ((~a) & b) More...
 
vfloat8 simd::madd (const vfloat8 &a, const vfloat8 &b, const vfloat8 &c)
 
vfloat8 simd::msub (const vfloat8 &a, const vfloat8 &b, const vfloat8 &c)
 
vfloat8 simd::nmadd (const vfloat8 &a, const vfloat8 &b, const vfloat8 &c)
 
vfloat8 simd::nmsub (const vfloat8 &a, const vfloat8 &b, const vfloat8 &c)
 
template<int i0, int i1, int i2, int i3>
OIIO_FORCEINLINE vfloat16 simd::shuffle4 (const vfloat16 &a)
 Shuffle groups of 4. More...
 
template<int i>
OIIO_FORCEINLINE vfloat16 simd::shuffle4 (const vfloat16 &a)
 shuffle4<i>(a) is the same as shuffle4<i,i,i,i>(a) More...
 
template<int i0, int i1, int i2, int i3>
OIIO_FORCEINLINE vfloat16 simd::shuffle (const vfloat16 &a)
 Shuffle within each group of 4. More...
 
template<int i>
vfloat16 simd::shuffle (const vfloat16 &a)
 shuffle<i>(a) is the same as shuffle<i,i,i,i>(a) More...
 
template<int i>
OIIO_FORCEINLINE float simd::extract (const vfloat16 &a)
 
template<int i>
OIIO_FORCEINLINE vfloat16 simd::insert (const vfloat16 &a, float val)
 Helper: substitute val for a[i]. More...
 
vfloat16 simd::vreduce_add (const vfloat16 &v)
 The sum of all components, returned in all components. More...
 
float simd::reduce_add (const vfloat16 &v)
 The sum of all components, returned as a scalar. More...
 
vfloat16 simd::blend (const vfloat16 &a, const vfloat16 &b, const vbool4 &mask)
 
vfloat16 simd::blend0 (const vfloat16 &a, const vbool4 &mask)
 
vfloat16 simd::blend0not (const vfloat16 &a, const vbool4 &mask)
 
vfloat16 simd::safe_div (const vfloat16 &a, const vfloat16 &b)
 
vfloat16 simd::select (const vbool16 &mask, const vfloat16 &a, const vfloat16 &b)
 
vfloat16 simd::abs (const vfloat16 &a)
 absolute value (float) More...
 
vfloat16 simd::sign (const vfloat16 &a)
 1.0 when value >= 0, -1 when negative More...
 
vfloat16 simd::ceil (const vfloat16 &a)
 
vfloat16 simd::floor (const vfloat16 &a)
 
vint16 simd::ifloor (const vfloat16 &a)
 (int)floor More...
 
vint16 simd::floori (const vfloat16 &a)
 
vfloat16 simd::round (const vfloat16 &a)
 
vint16 simd::rint (const vfloat16 &a)
 
vfloat16 simd::rcp_fast (const vfloat16 &a)
 Fast, approximate 1/a. More...
 
vfloat16 simd::sqrt (const vfloat16 &a)
 
vfloat16 simd::rsqrt (const vfloat16 &a)
 Fully accurate 1/sqrt. More...
 
vfloat16 simd::rsqrt_fast (const vfloat16 &a)
 Fast, approximate 1/sqrt. More...
 
vfloat16 simd::min (const vfloat16 &a, const vfloat16 &b)
 Per-element min. More...
 
vfloat16 simd::max (const vfloat16 &a, const vfloat16 &b)
 Per-element max. More...
 
vfloat16 simd::andnot (const vfloat16 &a, const vfloat16 &b)
 andnot(a,b) returns ((~a) & b) More...
 
vfloat16 simd::madd (const vfloat16 &a, const vfloat16 &b, const vfloat16 &c)
 
vfloat16 simd::msub (const vfloat16 &a, const vfloat16 &b, const vfloat16 &c)
 
vfloat16 simd::nmadd (const vfloat16 &a, const vfloat16 &b, const vfloat16 &c)
 
vfloat16 simd::nmsub (const vfloat16 &a, const vfloat16 &b, const vfloat16 &c)
 
bool simd::set_flush_zero_mode (bool on)
 
bool simd::set_denorms_zero_mode (bool on)
 
bool simd::get_flush_zero_mode ()
 
bool simd::get_denorms_zero_mode ()
 
OIIO_FORCEINLINE std::ostream & simd::operator<< (std::ostream &cout, const vbool4 &a)
 
OIIO_FORCEINLINE vbool4 simd::operator! (const vbool4 &a)
 
OIIO_FORCEINLINE vbool4 simd::operator& (const vbool4 &a, const vbool4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator| (const vbool4 &a, const vbool4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator^ (const vbool4 &a, const vbool4 &b)
 
OIIO_FORCEINLINE const vbool4 & simd::operator&= (vbool4 &a, const vbool4 &b)
 
OIIO_FORCEINLINE const vbool4 & simd::operator|= (vbool4 &a, const vbool4 &b)
 
OIIO_FORCEINLINE const vbool4 & simd::operator^= (vbool4 &a, const vbool4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator~ (const vbool4 &a)
 
OIIO_FORCEINLINE vbool4 simd::operator== (const vbool4 &a, const vbool4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator!= (const vbool4 &a, const vbool4 &b)
 
OIIO_FORCEINLINE std::ostream & simd::operator<< (std::ostream &cout, const vbool8 &a)
 
OIIO_FORCEINLINE vbool8 simd::operator! (const vbool8 &a)
 
OIIO_FORCEINLINE vbool8 simd::operator& (const vbool8 &a, const vbool8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator| (const vbool8 &a, const vbool8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator^ (const vbool8 &a, const vbool8 &b)
 
OIIO_FORCEINLINE const vbool8 & simd::operator&= (vbool8 &a, const vbool8 &b)
 
OIIO_FORCEINLINE const vbool8 & simd::operator|= (vbool8 &a, const vbool8 &b)
 
OIIO_FORCEINLINE const vbool8 & simd::operator^= (vbool8 &a, const vbool8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator~ (const vbool8 &a)
 
OIIO_FORCEINLINE vbool8 simd::operator== (const vbool8 &a, const vbool8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator!= (const vbool8 &a, const vbool8 &b)
 
OIIO_FORCEINLINE std::ostream & simd::operator<< (std::ostream &cout, const vbool16 &a)
 
OIIO_FORCEINLINE vbool16 simd::operator! (const vbool16 &a)
 
OIIO_FORCEINLINE vbool16 simd::operator& (const vbool16 &a, const vbool16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator| (const vbool16 &a, const vbool16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator^ (const vbool16 &a, const vbool16 &b)
 
OIIO_FORCEINLINE const vbool16 & simd::operator&= (vbool16 &a, const vbool16 &b)
 
OIIO_FORCEINLINE const vbool16 & simd::operator|= (vbool16 &a, const vbool16 &b)
 
OIIO_FORCEINLINE const vbool16 & simd::operator^= (vbool16 &a, const vbool16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator~ (const vbool16 &a)
 
OIIO_FORCEINLINE vbool16 simd::operator== (const vbool16 &a, const vbool16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator!= (const vbool16 &a, const vbool16 &b)
 
OIIO_FORCEINLINE vint4 simd::operator+ (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE const vint4 & simd::operator+= (vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vint4 simd::operator- (const vint4 &a)
 
OIIO_FORCEINLINE vint4 simd::operator- (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE const vint4 & simd::operator-= (vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vint4 simd::operator* (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE const vint4 & simd::operator*= (vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE const vint4 & simd::operator*= (vint4 &a, int b)
 
OIIO_FORCEINLINE vint4 simd::operator/ (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE const vint4 & simd::operator/= (vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vint4 simd::operator% (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE const vint4 & simd::operator%= (vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vint4 simd::operator% (const vint4 &a, int w)
 
OIIO_FORCEINLINE const vint4 & simd::operator%= (vint4 &a, int b)
 
OIIO_FORCEINLINE vint4 simd::operator& (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE const vint4 & simd::operator&= (vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vint4 simd::operator| (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE const vint4 & simd::operator|= (vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vint4 simd::operator^ (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE const vint4 & simd::operator^= (vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vint4 simd::operator~ (const vint4 &a)
 
OIIO_FORCEINLINE vint4 simd::operator<< (const vint4 &a, unsigned int bits)
 
OIIO_FORCEINLINE const vint4 & simd::operator<<= (vint4 &a, const unsigned int bits)
 
OIIO_FORCEINLINE vint4 simd::operator>> (const vint4 &a, const unsigned int bits)
 
OIIO_FORCEINLINE const vint4 & simd::operator>>= (vint4 &a, const unsigned int bits)
 
OIIO_FORCEINLINE vbool4 simd::operator== (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator!= (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator> (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator< (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator>= (const vint4 &a, const vint4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator<= (const vint4 &a, const vint4 &b)
 
std::ostream & simd::operator<< (std::ostream &cout, const vint4 &val)
 
template<int i>
OIIO_FORCEINLINE vint4 simd::insert (const vint4 &a, int val)
 
 simd::OIIO_DEPRECATED ("use bitcast_to_int() (1.8)") inline vint4 bitcast_to_int4(const vbool4 &x)
 
OIIO_FORCEINLINE vint8 simd::operator+ (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE const vint8 & simd::operator+= (vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vint8 simd::operator- (const vint8 &a)
 
OIIO_FORCEINLINE vint8 simd::operator- (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE const vint8 & simd::operator-= (vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vint8 simd::operator* (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE const vint8 & simd::operator*= (vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE const vint8 & simd::operator*= (vint8 &a, int b)
 
OIIO_FORCEINLINE vint8 simd::operator/ (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE const vint8 & simd::operator/= (vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vint8 simd::operator% (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE const vint8 & simd::operator%= (vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vint8 simd::operator% (const vint8 &a, int w)
 
OIIO_FORCEINLINE const vint8 & simd::operator%= (vint8 &a, int b)
 
OIIO_FORCEINLINE vint8 simd::operator& (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE const vint8 & simd::operator&= (vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vint8 simd::operator| (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE const vint8 & simd::operator|= (vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vint8 simd::operator^ (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE const vint8 & simd::operator^= (vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vint8 simd::operator~ (const vint8 &a)
 
OIIO_FORCEINLINE vint8 simd::operator<< (const vint8 &a, unsigned int bits)
 
OIIO_FORCEINLINE const vint8 & simd::operator<<= (vint8 &a, const unsigned int bits)
 
OIIO_FORCEINLINE vint8 simd::operator>> (const vint8 &a, const unsigned int bits)
 
OIIO_FORCEINLINE const vint8 & simd::operator>>= (vint8 &a, const unsigned int bits)
 
OIIO_FORCEINLINE vbool8 simd::operator== (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator!= (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator> (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator< (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator>= (const vint8 &a, const vint8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator<= (const vint8 &a, const vint8 &b)
 
std::ostream & simd::operator<< (std::ostream &cout, const vint8 &val)
 
OIIO_FORCEINLINE vint16 simd::operator+ (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE const vint16 & simd::operator+= (vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vint16 simd::operator- (const vint16 &a)
 
OIIO_FORCEINLINE vint16 simd::operator- (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE const vint16 & simd::operator-= (vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vint16 simd::operator* (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE const vint16 & simd::operator*= (vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE const vint16 & simd::operator*= (vint16 &a, int b)
 
OIIO_FORCEINLINE vint16 simd::operator/ (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE const vint16 & simd::operator/= (vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vint16 simd::operator% (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE const vint16 & simd::operator%= (vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vint16 simd::operator% (const vint16 &a, int w)
 
OIIO_FORCEINLINE const vint16 & simd::operator%= (vint16 &a, int b)
 
OIIO_FORCEINLINE vint16 simd::operator& (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE const vint16 & simd::operator&= (vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vint16 simd::operator| (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE const vint16 & simd::operator|= (vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vint16 simd::operator^ (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE const vint16 & simd::operator^= (vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vint16 simd::operator~ (const vint16 &a)
 
OIIO_FORCEINLINE vint16 simd::operator<< (const vint16 &a, const unsigned int bits)
 
OIIO_FORCEINLINE const vint16 & simd::operator<<= (vint16 &a, const unsigned int bits)
 
OIIO_FORCEINLINE vint16 simd::operator>> (const vint16 &a, const unsigned int bits)
 
OIIO_FORCEINLINE const vint16 & simd::operator>>= (vint16 &a, const unsigned int bits)
 
OIIO_FORCEINLINE vbool16 simd::operator== (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator!= (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator> (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator< (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator>= (const vint16 &a, const vint16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator<= (const vint16 &a, const vint16 &b)
 
std::ostream & simd::operator<< (std::ostream &cout, const vint16 &val)
 
OIIO_FORCEINLINE vfloat4 simd::operator+ (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vfloat4 simd::operator- (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vfloat4 simd::operator* (const vfloat4 &a, float b)
 
OIIO_FORCEINLINE vfloat4 simd::operator* (float a, const vfloat4 &b)
 
OIIO_FORCEINLINE vfloat4 simd::operator* (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vfloat4 simd::operator/ (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator== (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator!= (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator< (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator> (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator>= (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vbool4 simd::operator<= (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vfloat4 simd::AxyBxy (const vfloat4 &a, const vfloat4 &b)
 
OIIO_FORCEINLINE vfloat4 simd::AxBxAyBy (const vfloat4 &a, const vfloat4 &b)
 
std::ostream & simd::operator<< (std::ostream &cout, const vfloat4 &val)
 
vint4 simd::bitcast_to_int4 (const vfloat4 &x)
 
vfloat4 simd::bitcast_to_float4 (const vint4 &x)
 
OIIO_FORCEINLINE vfloat3 simd::operator+ (const vfloat3 &a, const vfloat3 &b)
 
OIIO_FORCEINLINE vfloat3 simd::operator- (const vfloat3 &a, const vfloat3 &b)
 
OIIO_FORCEINLINE vfloat3 simd::operator* (const vfloat3 &a, const vfloat3 &b)
 
OIIO_FORCEINLINE vfloat3 simd::operator* (const vfloat3 &a, float b)
 
OIIO_FORCEINLINE vfloat3 simd::operator* (float a, const vfloat3 &b)
 
OIIO_FORCEINLINE vfloat3 simd::operator/ (const vfloat3 &a, const vfloat3 &b)
 
std::ostream & simd::operator<< (std::ostream &cout, const vfloat3 &val)
 
OIIO_FORCEINLINE vfloat3 simd::vreduce_add (const vfloat3 &v)
 
OIIO_FORCEINLINE vfloat3 simd::vdot (const vfloat3 &a, const vfloat3 &b)
 
OIIO_FORCEINLINE float simd::dot (const vfloat3 &a, const vfloat3 &b)
 
OIIO_FORCEINLINE vfloat3 simd::vdot3 (const vfloat3 &a, const vfloat3 &b)
 
OIIO_FORCEINLINE vfloat4 simd::operator* (const vfloat4 &V, const matrix44 &M)
 
OIIO_FORCEINLINE vfloat4 simd::operator* (const matrix44 &M, const vfloat4 &V)
 
OIIO_FORCEINLINE bool simd::operator== (const Imath::M44f &a, const matrix44 &b)
 
OIIO_FORCEINLINE bool simd::operator!= (const Imath::M44f &a, const matrix44 &b)
 
std::ostream & simd::operator<< (std::ostream &cout, const matrix44 &M)
 
std::ostream & simd::operator<< (std::ostream &cout, const vfloat8 &val)
 
OIIO_FORCEINLINE vfloat8 simd::operator+ (const vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE const vfloat8 & simd::operator+= (vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE vfloat8 simd::operator- (const vfloat8 &a)
 
OIIO_FORCEINLINE vfloat8 simd::operator- (const vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE const vfloat8 & simd::operator-= (vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE vfloat8 simd::operator* (const vfloat8 &a, float b)
 
OIIO_FORCEINLINE vfloat8 simd::operator* (float a, const vfloat8 &b)
 
OIIO_FORCEINLINE vfloat8 simd::operator* (const vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE const vfloat8 & simd::operator*= (vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE vfloat8 simd::operator/ (const vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE const vfloat8 & simd::operator/= (vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator== (const vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator!= (const vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator< (const vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator> (const vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator>= (const vfloat8 &a, const vfloat8 &b)
 
OIIO_FORCEINLINE vbool8 simd::operator<= (const vfloat8 &a, const vfloat8 &b)
 
std::ostream & simd::operator<< (std::ostream &cout, const vfloat16 &val)
 
OIIO_FORCEINLINE vfloat16 simd::operator+ (const vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE const vfloat16 & simd::operator+= (vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE vfloat16 simd::operator- (const vfloat16 &a)
 
OIIO_FORCEINLINE vfloat16 simd::operator- (const vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE const vfloat16 & simd::operator-= (vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE vfloat16 simd::operator* (const vfloat16 &a, float b)
 
OIIO_FORCEINLINE vfloat16 simd::operator* (float a, const vfloat16 &b)
 
OIIO_FORCEINLINE vfloat16 simd::operator* (const vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE const vfloat16 & simd::operator*= (vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE vfloat16 simd::operator/ (const vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE const vfloat16 & simd::operator/= (vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator== (const vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator!= (const vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator< (const vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator> (const vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator>= (const vfloat16 &a, const vfloat16 &b)
 
OIIO_FORCEINLINE vbool16 simd::operator<= (const vfloat16 &a, const vfloat16 &b)
 
template<int i0, int i1, int i2, int i3>
vfloat16 simd::shuffle4 (const vfloat16 &a)
 Shuffle groups of 4. More...
 
template<int i>
vfloat16 simd::shuffle4 (const vfloat16 &a)
 Shuffle groups of 4. More...
 
template<int i0, int i1, int i2, int i3>
vfloat16 simd::shuffle (const vfloat16 &a)
 Shuffle within each group of 4. More...
 
OIIO_FORCEINLINE vfloat16 simd::blend (const vfloat16 &a, const vfloat16 &b, const vbool16 &mask)
 
OIIO_FORCEINLINE vfloat16 simd::blend0 (const vfloat16 &a, const vbool16 &mask)
 
OIIO_FORCEINLINE vfloat16 simd::blend0not (const vfloat16 &a, const vbool16 &mask)
 

Detailed Description

Classes for SIMD processing.

Nice references for all the Intel intrinsics (SSE*, AVX*, etc.): https://software.intel.com/sites/landingpage/IntrinsicsGuide/

Similar guide for ARM intrinsics: https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics

It helped me a lot to peruse the source of these packages: Syrah: https://github.com/boulos/syrah Embree: https://github.com/embree Vectorial: https://github.com/scoopr/vectorial

To find out which CPU features you have: Linux: cat /proc/cpuinfo OSX: sysctl machdep.cpu.features

Additional web resources: http://www.codersnotes.com/notes/maths-lib-2016/

Definition in file simd.h.

Macro Definition Documentation

#define OIIO_AVX512BW_ENABLED   0

Definition at line 179 of file simd.h.

#define OIIO_AVX512CD_ENABLED   0

Definition at line 178 of file simd.h.

#define OIIO_AVX512DQ_ENABLED   0

Definition at line 175 of file simd.h.

#define OIIO_AVX512ER_ENABLED   0

Definition at line 177 of file simd.h.

#define OIIO_AVX512IFMA_ENABLED   0

Definition at line 190 of file simd.h.

#define OIIO_AVX512PF_ENABLED   0

Definition at line 176 of file simd.h.

#define OIIO_AVX512VL_ENABLED   0

Definition at line 174 of file simd.h.

#define OIIO_F16C_ENABLED   0

Definition at line 196 of file simd.h.

#define OIIO_FMA_ENABLED   0

Definition at line 185 of file simd.h.

#define OIIO_SIMD   0

Definition at line 213 of file simd.h.

#define OIIO_SIMD16_ALIGN   OIIO_SIMD8_ALIGN

Definition at line 222 of file simd.h.

#define OIIO_SIMD4_ALIGN

Definition at line 214 of file simd.h.

#define OIIO_SIMD8_ALIGN   OIIO_SIMD4_ALIGN

Definition at line 219 of file simd.h.

#define OIIO_SIMD_AVX   0

Definition at line 173 of file simd.h.

#define OIIO_SIMD_FLOAT4_CONST (   name,
  val 
)    static const OIIO_SIMD4_ALIGN float name[4] = { (val), (val), (val), (val) }

Definition at line 365 of file simd.h.

#define OIIO_SIMD_FLOAT4_CONST4 (   name,
  v0,
  v1,
  v2,
  v3 
)    static const OIIO_SIMD4_ALIGN float name[4] = { (v0), (v1), (v2), (v3) }

Definition at line 367 of file simd.h.

#define OIIO_SIMD_FLOAT8_CONST (   name,
  val 
)
Value:
static const OIIO_SIMD8_ALIGN float name[8] = { (val), (val), (val), (val), \
(val), (val), (val), (val) }
#define OIIO_SIMD8_ALIGN
Definition: simd.h:219
GLuint const GLchar * name
Definition: glcorearb.h:786
GLuint GLfloat * val
Definition: glcorearb.h:1608

Definition at line 378 of file simd.h.

#define OIIO_SIMD_FLOAT8_CONST8 (   name,
  v0,
  v1,
  v2,
  v3,
  v4,
  v5,
  v6,
  v7 
)
Value:
static const OIIO_SIMD8_ALIGN float name[8] = { (v0), (v1), (v2), (v3), \
(v4), (v5), (v6), (v7) }
#define OIIO_SIMD8_ALIGN
Definition: simd.h:219
GLfloat GLfloat GLfloat v2
Definition: glcorearb.h:818
GLfloat GLfloat GLfloat GLfloat v3
Definition: glcorearb.h:819
GLuint const GLchar * name
Definition: glcorearb.h:786
GLfloat v0
Definition: glcorearb.h:816
GLfloat GLfloat v1
Definition: glcorearb.h:817

Definition at line 381 of file simd.h.

#define OIIO_SIMD_HAS_FLOAT8   1 /* DEPRECATED(1.8) */

Definition at line 232 of file simd.h.

#define OIIO_SIMD_HAS_MATRIX4   1 /* matrix44 defined */

Definition at line 231 of file simd.h.

#define OIIO_SIMD_HAS_SIMD16   1 /* vfloat16, vint16, vbool16 defined */

Definition at line 234 of file simd.h.

#define OIIO_SIMD_HAS_SIMD8   1 /* vfloat8, vint8, vbool8 defined */

Definition at line 233 of file simd.h.

#define OIIO_SIMD_INT16_CONST (   name,
  val 
)
Value:
static const OIIO_SIMD16_ALIGN int name[16] = { \
(val), (val), (val), (val), (val), (val), (val), (val), \
(val), (val), (val), (val), (val), (val), (val), (val) }
GLuint const GLchar * name
Definition: glcorearb.h:786
#define OIIO_SIMD16_ALIGN
Definition: simd.h:222
GLuint GLfloat * val
Definition: glcorearb.h:1608

Definition at line 405 of file simd.h.

#define OIIO_SIMD_INT16_CONST16 (   name,
  v0,
  v1,
  v2,
  v3,
  v4,
  v5,
  v6,
  v7,
  v8,
  v9,
  v10,
  v11,
  v12,
  v13,
  v14,
  v15 
)
Value:
static const OIIO_SIMD16_ALIGN int name[16] = { \
(v0), (v1), (v2), (v3), (v4), (v5), (v6), (v7), \
(v8), (v9), (v10), (v11), (v12), (v13), (v14), (v15) }
GLfloat GLfloat GLfloat v2
Definition: glcorearb.h:818
GLfloat GLfloat GLfloat GLfloat v3
Definition: glcorearb.h:819
GLuint const GLchar * name
Definition: glcorearb.h:786
GLfloat v0
Definition: glcorearb.h:816
#define OIIO_SIMD16_ALIGN
Definition: simd.h:222
GLfloat GLfloat v1
Definition: glcorearb.h:817

Definition at line 409 of file simd.h.

#define OIIO_SIMD_INT4_CONST (   name,
  val 
)    static const OIIO_SIMD4_ALIGN int name[4] = { (val), (val), (val), (val) }

Definition at line 369 of file simd.h.

#define OIIO_SIMD_INT4_CONST4 (   name,
  v0,
  v1,
  v2,
  v3 
)    static const OIIO_SIMD4_ALIGN int name[4] = { (v0), (v1), (v2), (v3) }

Definition at line 371 of file simd.h.

#define OIIO_SIMD_INT8_CONST (   name,
  val 
)
Value:
static const OIIO_SIMD8_ALIGN int name[8] = { (val), (val), (val), (val), \
(val), (val), (val), (val) }
#define OIIO_SIMD8_ALIGN
Definition: simd.h:219
GLuint const GLchar * name
Definition: glcorearb.h:786
GLuint GLfloat * val
Definition: glcorearb.h:1608

Definition at line 384 of file simd.h.

#define OIIO_SIMD_INT8_CONST8 (   name,
  v0,
  v1,
  v2,
  v3,
  v4,
  v5,
  v6,
  v7 
)
Value:
static const OIIO_SIMD8_ALIGN int name[8] = { (v0), (v1), (v2), (v3), \
(v4), (v5), (v6), (v7) }
#define OIIO_SIMD8_ALIGN
Definition: simd.h:219
GLfloat GLfloat GLfloat v2
Definition: glcorearb.h:818
GLfloat GLfloat GLfloat GLfloat v3
Definition: glcorearb.h:819
GLuint const GLchar * name
Definition: glcorearb.h:786
GLfloat v0
Definition: glcorearb.h:816
GLfloat GLfloat v1
Definition: glcorearb.h:817

Definition at line 387 of file simd.h.

#define OIIO_SIMD_MAX_SIZE_BYTES   16

Definition at line 215 of file simd.h.

#define OIIO_SIMD_NEON   0

Definition at line 208 of file simd.h.

#define OIIO_SIMD_SSE   0

Definition at line 115 of file simd.h.

#define OIIO_SIMD_UINT16_CONST (   name,
  val 
)
Value:
static const OIIO_SIMD16_ALIGN uint32_t name[16] = { \
(val), (val), (val), (val), (val), (val), (val), (val), \
(val), (val), (val), (val), (val), (val), (val), (val) }
GLuint const GLchar * name
Definition: glcorearb.h:786
#define OIIO_SIMD16_ALIGN
Definition: simd.h:222
GLuint GLfloat * val
Definition: glcorearb.h:1608

Definition at line 413 of file simd.h.

#define OIIO_SIMD_UINT16_CONST16 (   name,
  v0,
  v1,
  v2,
  v3,
  v4,
  v5,
  v6,
  v7,
  v8,
  v9,
  v10,
  v11,
  v12,
  v13,
  v14,
  v15 
)
Value:
static const OIIO_SIMD16_ALIGN uint32_t name[16] = { \
(val), (val), (val), (val), (val), (val), (val), (val), \
(val), (val), (val), (val), (val), (val), (val), (val) }
GLuint const GLchar * name
Definition: glcorearb.h:786
#define OIIO_SIMD16_ALIGN
Definition: simd.h:222
GLuint GLfloat * val
Definition: glcorearb.h:1608

Definition at line 417 of file simd.h.

#define OIIO_SIMD_UINT4_CONST (   name,
  val 
)    static const OIIO_SIMD4_ALIGN uint32_t name[4] = { (val), (val), (val), (val) }

Definition at line 373 of file simd.h.

#define OIIO_SIMD_UINT4_CONST4 (   name,
  v0,
  v1,
  v2,
  v3 
)    static const OIIO_SIMD4_ALIGN uint32_t name[4] = { (v0), (v1), (v2), (v3) }

Definition at line 375 of file simd.h.

#define OIIO_SIMD_UINT8_CONST (   name,
  val 
)
Value:
static const OIIO_SIMD8_ALIGN uint32_t name[8] = { (val), (val), (val), (val), \
(val), (val), (val), (val) }
#define OIIO_SIMD8_ALIGN
Definition: simd.h:219
GLuint const GLchar * name
Definition: glcorearb.h:786
GLuint GLfloat * val
Definition: glcorearb.h:1608

Definition at line 390 of file simd.h.

#define OIIO_SIMD_UINT8_CONST8 (   name,
  v0,
  v1,
  v2,
  v3,
  v4,
  v5,
  v6,
  v7 
)
Value:
static const OIIO_SIMD8_ALIGN uint32_t name[8] = { (v0), (v1), (v2), (v3), \
(v4), (v5), (v6), (v7) }
#define OIIO_SIMD8_ALIGN
Definition: simd.h:219
GLfloat GLfloat GLfloat v2
Definition: glcorearb.h:818
GLfloat GLfloat GLfloat GLfloat v3
Definition: glcorearb.h:819
GLuint const GLchar * name
Definition: glcorearb.h:786
GLfloat v0
Definition: glcorearb.h:816
GLfloat GLfloat v1
Definition: glcorearb.h:817

Definition at line 393 of file simd.h.

#define OIIO_SIMD_VFLOAT16_CONST (   name,
  val 
)
Value:
static const OIIO_SIMD16_ALIGN float name[16] = { \
(val), (val), (val), (val), (val), (val), (val), (val), \
(val), (val), (val), (val), (val), (val), (val), (val) }
GLuint const GLchar * name
Definition: glcorearb.h:786
#define OIIO_SIMD16_ALIGN
Definition: simd.h:222
GLuint GLfloat * val
Definition: glcorearb.h:1608

Definition at line 397 of file simd.h.

#define OIIO_SIMD_VFLOAT16_CONST16 (   name,
  v0,
  v1,
  v2,
  v3,
  v4,
  v5,
  v6,
  v7,
  v8,
  v9,
  v10,
  v11,
  v12,
  v13,
  v14,
  v15 
)
Value:
static const OIIO_SIMD16_ALIGN float name[16] = { \
(v0), (v1), (v2), (v3), (v4), (v5), (v6), (v7), \
(v8), (v9), (v10), (v11), (v12), (v13), (v14), (v15) }
GLfloat GLfloat GLfloat v2
Definition: glcorearb.h:818
GLfloat GLfloat GLfloat GLfloat v3
Definition: glcorearb.h:819
GLuint const GLchar * name
Definition: glcorearb.h:786
GLfloat v0
Definition: glcorearb.h:816
#define OIIO_SIMD16_ALIGN
Definition: simd.h:222
GLfloat GLfloat v1
Definition: glcorearb.h:817

Definition at line 401 of file simd.h.

#define SIMD_CONSTRUCT (   x)    for (int i = 0; i < elements; ++i) m_val[i] = (x)

Definition at line 428 of file simd.h.

#define SIMD_CONSTRUCT_PAD (   x)
Value:
for (int i = 0; i < elements; ++i) m_val[i] = (x); \
for (int i = elements; i < paddedelements; ++i) m_val[i] = 0
GLint GLenum GLint x
Definition: glcorearb.h:409
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 429 of file simd.h.

#define SIMD_DO (   x)    for (int i = 0; i < elements; ++i) x

Definition at line 427 of file simd.h.

#define SIMD_RETURN (   T,
  x 
)    T r; for (int i = 0; i < r.elements; ++i) r[i] = (x); return r

Definition at line 431 of file simd.h.

#define SIMD_RETURN_REDUCE (   T,
  init,
  op 
)    T r = init; for (int i = 0; i < v.elements; ++i) op; return r

Definition at line 432 of file simd.h.