MatchLib
All Classes Namespaces Files Functions Modules Pages
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
nvhls::nv_scvector< Type, VectorLength > Class Template Reference

Vector helper container with vector operations. More...

#include <nvhls_vector.h>

Inheritance diagram for nvhls::nv_scvector< Type, VectorLength >:
nvhls_message

Public Types

typedef Type type
 

Public Member Functions

 nv_scvector (const nv_scvector< Type, VectorLength > &that)
 
 nv_scvector (const Type newdata[VectorLength])
 
 nv_scvector (const NVUINTW(width) &rawbits)
 
 nv_scvector (const int &rawbits)
 
nv_scvector< Type, VectorLength > & operator= (const nv_scvector< Type, VectorLength > &that)
 
void copy (nv_scvector< Type, VectorLength > &out)
 
Typeoperator[] (unsigned int i)
 
const Typeoperator[] (unsigned int i) const
 
 NVUINTW (width) to_rawbits()
 
void to_vector (NVUINTW(width) rawbits)
 
template<unsigned int Size>
void Marshall (Marshaller< Size > &m)
 

Public Attributes

Type data [VectorLength]
 

Static Public Attributes

static const unsigned int type_width = Wrapped<Type>::width
 
static const unsigned int length = VectorLength
 
static const unsigned int width = type_width * VectorLength
 
static const bool is_signed = Wrapped<Type>::is_signed
 

Detailed Description

template<typename Type, unsigned int VectorLength>
class nvhls::nv_scvector< Type, VectorLength >

Vector helper container with vector operations.

Template Parameters
TypeScalarType
VectorLengthLength of vector
A Simple Example
#include <nvhls_vector.h>
...
nv_scvector<NVUINT2, 8> v1;
tmp = v1[3]; // Access an entry in vector
...
NVUINT16 v1_raw = v1.to_rawbits(); // Convert vector to integer bitstream
nv_scvector<NVUINT2, 8> v2 = v1_raw; // Initialize vector with integer bitstream
v1 = v2; // Assign vectors
#ifdef DEBUG
cout << v1 << " " << v2 << endl; // Print vectors
#endif
...
if (v1 == v2) { // Check if 2 vectors are equal
...
}
Vector helper container with vector operations.
nvhls_t< W >::nvuint_t get_slc(type X, const unsigned int i)
Function that returns slice of bits.
Definition nvhls_int.h:437

Definition at line 77 of file nvhls_vector.h.

Member Typedef Documentation

◆ type

Definition at line 80 of file nvhls_vector.h.

Constructor & Destructor Documentation

◆ nv_scvector() [1/5]

template<typename Type , unsigned int VectorLength>
nvhls::nv_scvector< Type, VectorLength >::nv_scvector ( )
inline

Definition at line 86 of file nvhls_vector.h.

◆ nv_scvector() [2/5]

template<typename Type , unsigned int VectorLength>
nvhls::nv_scvector< Type, VectorLength >::nv_scvector ( const nv_scvector< Type, VectorLength > &  that)
inline

Definition at line 88 of file nvhls_vector.h.

◆ nv_scvector() [3/5]

template<typename Type , unsigned int VectorLength>
nvhls::nv_scvector< Type, VectorLength >::nv_scvector ( const Type  newdata[VectorLength])
inline

Definition at line 93 of file nvhls_vector.h.

◆ nv_scvector() [4/5]

template<typename Type , unsigned int VectorLength>
nvhls::nv_scvector< Type, VectorLength >::nv_scvector ( const NVUINTW(width) &  rawbits)
inline

Definition at line 99 of file nvhls_vector.h.

◆ nv_scvector() [5/5]

template<typename Type , unsigned int VectorLength>
nvhls::nv_scvector< Type, VectorLength >::nv_scvector ( const int rawbits)
inline

Definition at line 105 of file nvhls_vector.h.

Member Function Documentation

◆ operator=()

Definition at line 112 of file nvhls_vector.h.

◆ copy()

template<typename Type , unsigned int VectorLength>
void nvhls::nv_scvector< Type, VectorLength >::copy ( nv_scvector< Type, VectorLength > &  out)
inline

Definition at line 120 of file nvhls_vector.h.

◆ operator[]() [1/2]

template<typename Type , unsigned int VectorLength>
Type & nvhls::nv_scvector< Type, VectorLength >::operator[] ( unsigned int  i)
inline

Definition at line 125 of file nvhls_vector.h.

◆ operator[]() [2/2]

template<typename Type , unsigned int VectorLength>
const Type & nvhls::nv_scvector< Type, VectorLength >::operator[] ( unsigned int  i) const
inline

Definition at line 128 of file nvhls_vector.h.

◆ NVUINTW()

template<typename Type , unsigned int VectorLength>
nvhls::nv_scvector< Type, VectorLength >::NVUINTW ( width  )
inline

Definition at line 132 of file nvhls_vector.h.

◆ to_vector()

template<typename Type , unsigned int VectorLength>
void nvhls::nv_scvector< Type, VectorLength >::to_vector ( NVUINTW(width)  rawbits)
inline

Definition at line 141 of file nvhls_vector.h.

◆ Marshall()

template<typename Type , unsigned int VectorLength>
template<unsigned int Size>
void nvhls::nv_scvector< Type, VectorLength >::Marshall ( Marshaller< Size > &  m)
inline

Definition at line 149 of file nvhls_vector.h.

Member Data Documentation

◆ data

Definition at line 79 of file nvhls_vector.h.

◆ type_width

template<typename Type , unsigned int VectorLength>
const unsigned int nvhls::nv_scvector< Type, VectorLength >::type_width = Wrapped<Type>::width
static

Definition at line 81 of file nvhls_vector.h.

◆ length

template<typename Type , unsigned int VectorLength>
const unsigned int nvhls::nv_scvector< Type, VectorLength >::length = VectorLength
static

Definition at line 82 of file nvhls_vector.h.

◆ width

template<typename Type , unsigned int VectorLength>
const unsigned int nvhls::nv_scvector< Type, VectorLength >::width = type_width * VectorLength
static

Definition at line 83 of file nvhls_vector.h.

◆ is_signed

template<typename Type , unsigned int VectorLength>
const bool nvhls::nv_scvector< Type, VectorLength >::is_signed = Wrapped<Type>::is_signed
static

Definition at line 84 of file nvhls_vector.h.


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