Fermat
Public Types | Public Methods | Static Public Methods | Public Members | Static Public Members | List of all members
cugar::register_array< Iterator, SIZE > Struct Template Reference

Detailed description

template<typename Iterator, uint32 SIZE>
struct cugar::register_array< Iterator, SIZE >

A statically sized array using registers as backing storage. The ability to be placed in registers is achieved by avoiding dynamic indexing, replacing that by an explicit O(log(N)) binary-search.

Template Parameters
Iteratorthe base iterator type
SIZEthe size of the array

#include <register_array.h>

Public Types

typedef iterator_traits< Iterator >::reference reference_type
 

Public Methods

CUGAR_FORCEINLINE CUGAR_HOST_DEVICE register_array ()
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE register_array (Iterator it)
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference_type operator[] (const uint32 i) const
 
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE operator Iterator () const
 

Static Public Methods

CUGAR_FORCEINLINE static CUGAR_HOST_DEVICE reference select (const Iterator &it, const uint32 i)
 

Public Members

Iterator r
 

Static Public Members

static const uint32 DIM = SIZE
 

Constructor & Destructor Documentation

◆ register_array() [1/2]

template<typename Iterator , uint32 SIZE>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE cugar::register_array< Iterator, SIZE >::register_array ( )
inline

constructor

◆ register_array() [2/2]

template<typename Iterator , uint32 SIZE>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE cugar::register_array< Iterator, SIZE >::register_array ( Iterator  it)
inline

constructor

Member Function Documentation

◆ operator Iterator()

template<typename Iterator , uint32 SIZE>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE cugar::register_array< Iterator, SIZE >::operator Iterator ( ) const
inline

automatic conversion to iterator

◆ operator[]()

template<typename Iterator , uint32 SIZE>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE reference_type cugar::register_array< Iterator, SIZE >::operator[] ( const uint32  i) const
inline

indexing operator

◆ select()

template<typename Iterator , uint32 SIZE>
CUGAR_FORCEINLINE static CUGAR_HOST_DEVICE reference cugar::register_array< Iterator, SIZE >::select ( const Iterator &  it,
const uint32  i 
)
inlinestatic

indexing operator


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