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

#include <simd.h>

Public Types

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

Public Member Functions

 vbool8 ()
 Default constructor (contents undefined) More...
 
 vbool8 (bool a)
 Construct from a single value (store it in all slots) More...
 
 vbool8 (const bool *values)
 
 vbool8 (bool a, bool b, bool c, bool d, bool e, bool f, bool g, bool h)
 Construct from 8 bool values. More...
 
 vbool8 (const vbool8 &other)
 Copy construct from another vbool8. More...
 
 vbool8 (int a, int b, int c, int d, int e, int f, int g, int h)
 Construct from 8 int values. More...
 
 vbool8 (const vint8 &i)
 Construct from a SIMD int (is each element nonzero?) More...
 
 vbool8 (const vbool4 &lo, const vbool4 &hi)
 Construct from two vbool4's. More...
 
 vbool8 (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
 Extract the bitmask. More...
 
void clear ()
 Set all components to false. More...
 
const vbool8operator= (bool a)
 Assign one value to all components. More...
 
const vbool8operator= (const vbool8 &other)
 Assignment of another vbool8. More...
 
int operator[] (int i) const
 Component access (get) More...
 
void setcomp (int i, bool value)
 Component access (set). More...
 
intoperator[] (int i)
 
vbool4 lo () const
 Extract the lower precision vbool4. More...
 
vbool4 hi () const
 Extract the higher precision vbool4. More...
 
void load (bool a)
 Helper: load a single value into all components. More...
 
void load (bool a, bool b, bool c, bool d, bool e, bool f, bool g, bool h)
 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 vbool8 from_bitmask (int bitmask)
 Convert from integer bitmask to a true vbool8. More...
 
static const vbool8 False ()
 Return a vbool8 the is 'false' for all values. More...
 
static const vbool8 True ()
 Return a vbool8 the is 'true' for all values. More...
 

Friends

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

Detailed Description

vbool8: An 8-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 vfloat8 and vint8 types.

Definition at line 598 of file simd.h.

Member Typedef Documentation

the native SIMD type used

Definition at line 605 of file simd.h.

typedef bool simd::vbool8::value_t

Underlying equivalent scalar value type.

Definition at line 601 of file simd.h.

Member Enumeration Documentation

anonymous enum
Enumerator
elements 

Definition at line 602 of file simd.h.

anonymous enum
Enumerator
paddedelements 

Definition at line 603 of file simd.h.

anonymous enum
Enumerator
bits 

Definition at line 604 of file simd.h.

Constructor & Destructor Documentation

simd::vbool8::vbool8 ( )
inline

Default constructor (contents undefined)

Definition at line 608 of file simd.h.

simd::vbool8::vbool8 ( bool  a)
inline

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

Definition at line 611 of file simd.h.

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

Definition at line 3551 of file simd.h.

OIIO_FORCEINLINE simd::vbool8::vbool8 ( bool  a,
bool  b,
bool  c,
bool  d,
bool  e,
bool  f,
bool  g,
bool  h 
)

Construct from 8 bool values.

Definition at line 3540 of file simd.h.

simd::vbool8::vbool8 ( const vbool8 other)
inline

Copy construct from another vbool8.

Definition at line 619 of file simd.h.

OIIO_FORCEINLINE simd::vbool8::vbool8 ( int  a,
int  b,
int  c,
int  d,
int  e,
int  f,
int  g,
int  h 
)

Construct from 8 int values.

Definition at line 3545 of file simd.h.

OIIO_FORCEINLINE simd::vbool8::vbool8 ( const vint8 i)

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

Definition at line 5709 of file simd.h.

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

Construct from two vbool4's.

Definition at line 3642 of file simd.h.

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

Construct from the underlying SIMD type.

Definition at line 631 of file simd.h.

Member Function Documentation

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

Extract the bitmask.

Definition at line 3566 of file simd.h.

OIIO_FORCEINLINE void simd::vbool8::clear ( )

Set all components to false.

Definition at line 3582 of file simd.h.

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

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

Definition at line 3590 of file simd.h.

OIIO_FORCEINLINE vbool8 simd::vbool8::from_bitmask ( int  bitmask)
static

Convert from integer bitmask to a true vbool8.

Definition at line 3576 of file simd.h.

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

Extract the higher precision vbool4.

Definition at line 3633 of file simd.h.

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

Extract the lower precision vbool4.

Definition at line 3625 of file simd.h.

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

Helper: load a single value into all components.

Definition at line 3505 of file simd.h.

OIIO_FORCEINLINE void simd::vbool8::load ( bool  a,
bool  b,
bool  c,
bool  d,
bool  e,
bool  f,
bool  g,
bool  h 
)

Helper: load separate values into each component.

Definition at line 3518 of file simd.h.

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

Return the raw SIMD type.

Definition at line 634 of file simd.h.

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

Assign one value to all components.

Definition at line 3556 of file simd.h.

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

Assignment of another vbool8.

Definition at line 3561 of file simd.h.

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

Component access (get)

Definition at line 3477 of file simd.h.

OIIO_FORCEINLINE int & simd::vbool8::operator[] ( int  i)

Component access (set). NOTE: avoid this unsafe construct. It will go away some day.

Definition at line 3491 of file simd.h.

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

Component access (set).

Definition at line 3486 of file simd.h.

simd_t simd::vbool8::simd ( ) const
inline

Definition at line 635 of file simd.h.

simd_t& simd::vbool8::simd ( )
inline

Definition at line 636 of file simd.h.

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

Helper: store the values into memory as bools.

Definition at line 3614 of file simd.h.

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

Store the first n values into memory.

Definition at line 3618 of file simd.h.

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

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

Definition at line 3599 of file simd.h.

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

Definition at line 600 of file simd.h.

Friends And Related Function Documentation

vbool8 operator! ( const vbool8 a)
friend

Logical/bitwise operators, component-by-component.

Definition at line 3654 of file simd.h.

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

Definition at line 3720 of file simd.h.

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

Definition at line 3662 of file simd.h.

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

Definition at line 3687 of file simd.h.

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

Stream output.

Definition at line 3497 of file simd.h.

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

Comparison operators, component by component.

Definition at line 3710 of file simd.h.

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

Definition at line 3678 of file simd.h.

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

Definition at line 3695 of file simd.h.

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

Definition at line 3670 of file simd.h.

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

Definition at line 3691 of file simd.h.

vbool8 operator~ ( const vbool8 a)
friend

Definition at line 3700 of file simd.h.

Member Data Documentation

vbool4 simd::vbool8::m_4[2]

Definition at line 710 of file simd.h.

simd_t simd::vbool8::m_simd

Definition at line 708 of file simd.h.

int simd::vbool8::m_val[paddedelements]

Definition at line 709 of file simd.h.


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