MatchLib
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)
 
Type & operator[] (unsigned int i)
 
const Type & operator[] (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;
Type tmp;
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
...
}

Definition at line 77 of file nvhls_vector.h.


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