HDK
|
#include <simd.h>
Public Types | |
enum | { elements = 4 } |
enum | { paddedelements = 4 } |
enum | { bits = elements*32 } |
typedef bool | value_t |
Underlying equivalent scalar value type. More... | |
typedef simd_bool_t< 4 >::type | simd_t |
the native SIMD type used More... | |
Public Member Functions | |
vbool4 () | |
Default constructor (contents undefined) More... | |
vbool4 (bool a) | |
Construct from a single value (store it in all slots) More... | |
vbool4 (const bool *a) | |
vbool4 (bool a, bool b, bool c, bool d) | |
Construct from 4 bool values. More... | |
vbool4 (const vbool4 &other) | |
Copy construct from another vbool4. More... | |
vbool4 (int a, int b, int c, int d) | |
Construct from 4 int values. More... | |
vbool4 (const vint4 &i) | |
Construct from a SIMD int (is each element nonzero?) More... | |
vbool4 (const simd_t &m) | |
Construct from the underlying SIMD type. More... | |
operator simd_t () const | |
Return the raw SIMD type. More... | |
simd_t | simd () const |
simd_t & | simd () |
int | bitmask () const |
Extract the bitmask. More... | |
void | clear () |
Set all components to false. More... | |
const vbool4 & | operator= (bool a) |
Assign one value to all components. More... | |
const vbool4 & | operator= (const vbool4 &other) |
Assignment of another vbool4. More... | |
int | operator[] (int i) const |
Component access (get) More... | |
void | setcomp (int i, bool value) |
Component access (set). More... | |
int & | operator[] (int i) |
void | load (bool a) |
Helper: load a single value into all components. More... | |
void | load (bool a, bool b, bool c, bool d) |
Helper: load separate values into each component. More... | |
void | store (bool *values) const |
Helper: store the values into memory as bools. More... | |
void | store (bool *values, int n) const |
Store the first n values into memory. More... | |
Static Public Member Functions | |
static const char * | type_name () |
static vbool4 | from_bitmask (int bitmask) |
Convert from integer bitmask to a true vbool4. More... | |
static const vbool4 | False () |
Return a vbool4 the is 'false' for all values. More... | |
static const vbool4 | True () |
Return a vbool4 the is 'true' for all values. More... | |
Friends | |
vbool4 | operator! (const vbool4 &a) |
Logical/bitwise operators, component-by-component. More... | |
vbool4 | operator& (const vbool4 &a, const vbool4 &b) |
vbool4 | operator| (const vbool4 &a, const vbool4 &b) |
vbool4 | operator^ (const vbool4 &a, const vbool4 &b) |
vbool4 | operator~ (const vbool4 &a) |
const vbool4 & | operator&= (vbool4 &a, const vbool4 &b) |
const vbool4 & | operator|= (vbool4 &a, const vbool4 &b) |
const vbool4 & | operator^= (vbool4 &a, const vbool4 &b) |
vbool4 | operator== (const vbool4 &a, const vbool4 &b) |
Comparison operators, component by component. More... | |
vbool4 | operator!= (const vbool4 &a, const vbool4 &b) |
std::ostream & | operator<< (std::ostream &cout, const vbool4 &a) |
Stream output. More... | |
vbool4: An 4-vector whose elements act mostly like bools, accelerated by SIMD instructions when available. This is what is naturally produced by SIMD comparison operators on the vfloat4 and vint4 types.
typedef simd_bool_t<4>::type simd::vbool4::simd_t |
typedef bool simd::vbool4::value_t |
|
inline |
|
inline |
|
explicit |
|
inline |
|
inline |
OIIO_FORCEINLINE simd::vbool4::vbool4 | ( | const vint4 & | i | ) |
|
inline |
OIIO_FORCEINLINE int simd::vbool4::bitmask | ( | ) | const |
OIIO_FORCEINLINE void simd::vbool4::clear | ( | ) |
|
static |
|
static |
OIIO_FORCEINLINE void simd::vbool4::load | ( | bool | a | ) |
OIIO_FORCEINLINE void simd::vbool4::load | ( | bool | a, |
bool | b, | ||
bool | c, | ||
bool | d | ||
) |
|
inline |
|
inline |
OIIO_FORCEINLINE const vbool4 & simd::vbool4::operator= | ( | const vbool4 & | other | ) |
OIIO_FORCEINLINE int simd::vbool4::operator[] | ( | int | i | ) | const |
OIIO_FORCEINLINE int & simd::vbool4::operator[] | ( | int | i | ) |
OIIO_FORCEINLINE void simd::vbool4::setcomp | ( | int | i, |
bool | value | ||
) |
OIIO_FORCEINLINE void simd::vbool4::store | ( | bool * | values | ) | const |
OIIO_FORCEINLINE void simd::vbool4::store | ( | bool * | values, |
int | n | ||
) | const |
|
static |
|
friend |
int simd::vbool4::m_val[paddedelements] |