HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
simd::vbool16 Class Reference

#include <simd.h>

Public Types

enum  { elements = 16 }
 
enum  { paddedelements = 16 }
 
enum  { bits = 16 }
 
typedef bool value_t
 Underlying equivalent scalar value type. More...
 
typedef simd_bool_t< 16 >::type simd_t
 the native SIMD type used More...
 

Public Member Functions

 vbool16 ()
 Default constructor (contents undefined) More...
 
 vbool16 (bool a)
 Construct from a single value (store it in all slots) More...
 
 vbool16 (int bitmask)
 
 vbool16 (const bool *values)
 
 vbool16 (bool v0, bool v1, bool v2, bool v3, bool v4, bool v5, bool v6, bool v7, bool v8, bool v9, bool v10, bool v11, bool v12, bool v13, bool v14, bool v15)
 Construct from 16 bool values. More...
 
 vbool16 (const vbool16 &other)
 Copy construct from another vbool16. More...
 
 vbool16 (int v0, int v1, int v2, int v3, int v4, int v5, int v6, int v7, int v8, int v9, int v10, int v11, int v12, int v13, int v14, int v15)
 Construct from 16 int values. More...
 
 vbool16 (const vint16 &i)
 Construct from a SIMD int (is each element nonzero?) More...
 
 vbool16 (const vbool8 &lo, const vbool8 &hi)
 Construct from two vbool8's. More...
 
 vbool16 (const vbool4 &b4a, const vbool4 &b4b, const vbool4 &b4c, const vbool4 &b4d)
 Construct from four vbool4's. More...
 
 vbool16 (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_tsimd ()
 
int bitmask () const
 
void clear ()
 Set all components to false. More...
 
const vbool16operator= (bool a)
 Assign one value to all components. More...
 
const vbool16operator= (const vbool16 &other)
 Assignment of another vbool16. More...
 
int operator[] (int i) const
 Component access (get) More...
 
void setcomp (int i, bool value)
 Component access (set). More...
 
vbool8 lo () const
 Extract the lower precision vbool8. More...
 
vbool8 hi () const
 Extract the higher precision vbool8. More...
 
void load (bool a)
 Helper: load a single value into all components. More...
 
void load (bool v0, bool v1, bool v2, bool v3, bool v4, bool v5, bool v6, bool v7, bool v8, bool v9, bool v10, bool v11, bool v12, bool v13, bool v14, bool v15)
 Helper: load separate values into each component. More...
 
void load_bitmask (int a)
 Helper: load all components from a bitmask in an int. 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 vbool16 from_bitmask (int bitmask)
 Convert from integer bitmask to a true vbool16. More...
 
static const vbool16 False ()
 Return a vbool16 the is 'false' for all values. More...
 
static const vbool16 True ()
 Return a vbool16 the is 'true' for all values. More...
 

Friends

vbool4 operator! (const vbool4 &a)
 Logical/bitwise operators, component-by-component. More...
 
vbool16 operator! (const vbool16 &a)
 
vbool16 operator& (const vbool16 &a, const vbool16 &b)
 
vbool16 operator| (const vbool16 &a, const vbool16 &b)
 
vbool16 operator^ (const vbool16 &a, const vbool16 &b)
 
vbool16 operator~ (const vbool16 &a)
 
const vbool16operator&= (vbool16 &a, const vbool16 &b)
 
const vbool16operator|= (vbool16 &a, const vbool16 &b)
 
const vbool16operator^= (vbool16 &a, const vbool16 &b)
 
vbool16 operator== (const vbool16 &a, const vbool16 &b)
 Comparison operators, component by component. More...
 
vbool16 operator!= (const vbool16 &a, const vbool16 &b)
 
std::ostream & operator<< (std::ostream &cout, const vbool16 &a)
 Stream output. More...
 

Detailed Description

vbool16: An 16-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 vfloat16 and vint16 types.

Definition at line 746 of file simd.h.

Member Typedef Documentation

the native SIMD type used

Definition at line 753 of file simd.h.

typedef bool simd::vbool16::value_t

Underlying equivalent scalar value type.

Definition at line 749 of file simd.h.

Member Enumeration Documentation

anonymous enum
Enumerator
elements 

Definition at line 750 of file simd.h.

anonymous enum
Enumerator
paddedelements 

Definition at line 751 of file simd.h.

anonymous enum
Enumerator
bits 

Definition at line 752 of file simd.h.

Constructor & Destructor Documentation

simd::vbool16::vbool16 ( )
inline

Default constructor (contents undefined)

Definition at line 756 of file simd.h.

simd::vbool16::vbool16 ( bool  a)
inline

Construct from a single value (store it in all slots)

Definition at line 759 of file simd.h.

simd::vbool16::vbool16 ( int  bitmask)
inlineexplicit

Definition at line 761 of file simd.h.

OIIO_FORCEINLINE simd::vbool16::vbool16 ( const bool *  values)
explicit

Definition at line 3874 of file simd.h.

OIIO_FORCEINLINE simd::vbool16::vbool16 ( bool  v0,
bool  v1,
bool  v2,
bool  v3,
bool  v4,
bool  v5,
bool  v6,
bool  v7,
bool  v8,
bool  v9,
bool  v10,
bool  v11,
bool  v12,
bool  v13,
bool  v14,
bool  v15 
)

Construct from 16 bool values.

Definition at line 3853 of file simd.h.

simd::vbool16::vbool16 ( const vbool16 other)
inline

Copy construct from another vbool16.

Definition at line 770 of file simd.h.

OIIO_FORCEINLINE simd::vbool16::vbool16 ( int  v0,
int  v1,
int  v2,
int  v3,
int  v4,
int  v5,
int  v6,
int  v7,
int  v8,
int  v9,
int  v10,
int  v11,
int  v12,
int  v13,
int  v14,
int  v15 
)

Construct from 16 int values.

Definition at line 3860 of file simd.h.

simd::vbool16::vbool16 ( const vint16 i)

Construct from a SIMD int (is each element nonzero?)

OIIO_FORCEINLINE simd::vbool16::vbool16 ( const vbool8 lo,
const vbool8 hi 
)

Construct from two vbool8's.

Definition at line 3870 of file simd.h.

simd::vbool16::vbool16 ( const vbool4 b4a,
const vbool4 b4b,
const vbool4 b4c,
const vbool4 b4d 
)

Construct from four vbool4's.

simd::vbool16::vbool16 ( const simd_t m)
inline

Construct from the underlying SIMD type.

Definition at line 786 of file simd.h.

Member Function Documentation

OIIO_FORCEINLINE int simd::vbool16::bitmask ( ) const

Definition at line 3891 of file simd.h.

OIIO_FORCEINLINE void simd::vbool16::clear ( )

Set all components to false.

Definition at line 3900 of file simd.h.

OIIO_FORCEINLINE const vbool16 simd::vbool16::False ( )
static

Return a vbool16 the is 'false' for all values.

Definition at line 3904 of file simd.h.

static vbool16 simd::vbool16::from_bitmask ( int  bitmask)
inlinestatic

Convert from integer bitmask to a true vbool16.

Definition at line 796 of file simd.h.

OIIO_FORCEINLINE vbool8 simd::vbool16::hi ( ) const

Extract the higher precision vbool8.

Definition at line 3934 of file simd.h.

OIIO_FORCEINLINE vbool8 simd::vbool16::lo ( ) const

Extract the lower precision vbool8.

Definition at line 3926 of file simd.h.

OIIO_FORCEINLINE void simd::vbool16::load ( bool  a)

Helper: load a single value into all components.

Definition at line 3821 of file simd.h.

OIIO_FORCEINLINE void simd::vbool16::load ( bool  v0,
bool  v1,
bool  v2,
bool  v3,
bool  v4,
bool  v5,
bool  v6,
bool  v7,
bool  v8,
bool  v9,
bool  v10,
bool  v11,
bool  v12,
bool  v13,
bool  v14,
bool  v15 
)

Helper: load separate values into each component.

Definition at line 3831 of file simd.h.

OIIO_FORCEINLINE void simd::vbool16::load_bitmask ( int  a)

Helper: load all components from a bitmask in an int.

Definition at line 3826 of file simd.h.

simd::vbool16::operator simd_t ( ) const
inline

Return the raw SIMD type.

Definition at line 789 of file simd.h.

OIIO_FORCEINLINE const vbool16 & simd::vbool16::operator= ( bool  a)

Assign one value to all components.

Definition at line 3880 of file simd.h.

OIIO_FORCEINLINE const vbool16 & simd::vbool16::operator= ( const vbool16 other)

Assignment of another vbool16.

Definition at line 3885 of file simd.h.

OIIO_FORCEINLINE int simd::vbool16::operator[] ( int  i) const

Component access (get)

Definition at line 3795 of file simd.h.

OIIO_FORCEINLINE void simd::vbool16::setcomp ( int  i,
bool  value 
)

Component access (set).

Definition at line 3804 of file simd.h.

simd_t simd::vbool16::simd ( ) const
inline

Definition at line 790 of file simd.h.

simd_t& simd::vbool16::simd ( )
inline

Definition at line 791 of file simd.h.

OIIO_FORCEINLINE void simd::vbool16::store ( bool *  values) const

Helper: store the values into memory as bools.

Definition at line 3914 of file simd.h.

OIIO_FORCEINLINE void simd::vbool16::store ( bool *  values,
int  n 
) const

Store the first n values into memory.

Definition at line 3918 of file simd.h.

OIIO_FORCEINLINE const vbool16 simd::vbool16::True ( )
static

Return a vbool16 the is 'true' for all values.

Definition at line 3909 of file simd.h.

static const char* simd::vbool16::type_name ( )
inlinestatic

Definition at line 748 of file simd.h.

Friends And Related Function Documentation

vbool4 operator! ( const vbool4 a)
friend

Logical/bitwise operators, component-by-component.

Definition at line 3277 of file simd.h.

vbool16 operator! ( const vbool16 a)
friend

Definition at line 3943 of file simd.h.

vbool16 operator!= ( const vbool16 a,
const vbool16 b 
)
friend

Definition at line 4002 of file simd.h.

vbool16 operator& ( const vbool16 a,
const vbool16 b 
)
friend

Definition at line 3951 of file simd.h.

const vbool16& operator&= ( vbool16 a,
const vbool16 b 
)
friend

Definition at line 3976 of file simd.h.

std::ostream& operator<< ( std::ostream &  cout,
const vbool16 a 
)
friend

Stream output.

Definition at line 3813 of file simd.h.

vbool16 operator== ( const vbool16 a,
const vbool16 b 
)
friend

Comparison operators, component by component.

Definition at line 3994 of file simd.h.

vbool16 operator^ ( const vbool16 a,
const vbool16 b 
)
friend

Definition at line 3967 of file simd.h.

const vbool16& operator^= ( vbool16 a,
const vbool16 b 
)
friend

Definition at line 3984 of file simd.h.

vbool16 operator| ( const vbool16 a,
const vbool16 b 
)
friend

Definition at line 3959 of file simd.h.

const vbool16& operator|= ( vbool16 a,
const vbool16 b 
)
friend

Definition at line 3980 of file simd.h.

vbool16 operator~ ( const vbool16 a)
friend

Definition at line 3989 of file simd.h.

Member Data Documentation

uint16_t simd::vbool16::m_bits

Definition at line 863 of file simd.h.

simd_t simd::vbool16::m_simd

Definition at line 862 of file simd.h.


The documentation for this class was generated from the following file: