MatchLib
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
nvhls::nv_array< Type, VectorLength > Class Template Reference

An implementation of array that declares VectorLength variables for array of size VectorLength. More...

#include <nvhls_array.h>

Classes

class  NNode
 

Public Member Functions

 nv_array (const char *prefix)
 
 nv_array (sc_module_name prefix)
 
 nv_array (sc_module_name prefix, const unsigned int &id)
 
 nv_array (const nv_array< Type, VectorLength > &that)
 
 nv_array (const Type newdata[VectorLength])
 
nv_array< Type, VectorLength > & operator= (const nv_array< Type, VectorLength > &that)
 
void copy (nv_array< Type, VectorLength > &out)
 
Type & operator[] (unsigned int i)
 
const Type & operator[] (unsigned int i) const
 
template<unsigned int Size>
void Marshall (Marshaller< Size > &m)
 

Public Attributes

NNode< Type, VectorLength-1 > array_impl
 

Static Public Attributes

static const unsigned int width = Wrapped<Type>::width * VectorLength
 

Detailed Description

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

An implementation of array that declares VectorLength variables for array of size VectorLength.

Template Parameters
TypeDatatype
VectorLengthSize of array
Overview
  • Declares VectorLength variables to realize an array of size VectorLength
  • Helpful when HLS tool does not recognize your array correctly and requires unrolling array
  • nv_array also has specialization for size 0 arrays
A Simple Example
#include <nvhls_array.h>
...
nvhls::nv_array<NVUINT32, ArraySize> array;
for (unsigned i = 0; i < ArraySize; i++) {
array[i] = i;
}

Definition at line 61 of file nvhls_array.h.


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