Public Types | List of all members
nvhls::index_width< X > Struct Template Reference

Compute index width of a constant. More...

#include <nvhls_int.h>

Public Types

enum  { val = (X==1)? 1 : log2_ceil<X>::val }

Detailed Description

template<unsigned X>
struct nvhls::index_width< X >

Compute index width of a constant.

Template Parameters
XMust be a constant
  • Returns 1 if X==1. otherwise log2_ceil<X>.
A Simple Example
#include <nvhls_int.h>
const int ArraySize = 8;
const int AddressWidth = nvhls::index_width<ArraySize>::val;

Definition at line 285 of file nvhls_int.h.

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