Speclib  0.1.2
The library for writing better CUDA libraries
sp::LUTSpec::ThreeValue< N > Struct Template Referencefinal

Three-value logic integer. More...

#include <LUT.hpp>

Public Types

using T = __uint< N >
 The type used to represent binary integers. More...
 

Public Attributes

T value = 0
 The value to insert into the lookup table. More...
 
T dontCare = 0
 The bits from value that are "don't care" values. More...
 

Static Public Attributes

static constexpr __uint< N > AllOnes = ~(T)0
 A value with all ones. More...
 

Detailed Description

template<int N = 32>
struct sp::LUTSpec::ThreeValue< N >

Three-value logic integer.

Each bit in the integer may be a zero, one, or a don't care value. Don't care values are useful for reducing the size of the LUT's representation.

Member Typedef Documentation

◆ T

template<int N = 32>
using sp::LUTSpec::ThreeValue< N >::T = __uint<N>

The type used to represent binary integers.

Member Data Documentation

◆ AllOnes

template<int N = 32>
constexpr __uint<N> sp::LUTSpec::ThreeValue< N >::AllOnes = ~(T)0
staticconstexpr

A value with all ones.

This is particularly useful as a value for dontCare.

◆ dontCare

template<int N = 32>
T sp::LUTSpec::ThreeValue< N >::dontCare = 0

The bits from value that are "don't care" values.

For best performance, as many bits in this field should be one as possible (while still being correct).

If a bit in this field is one, then it is not defined whether the corresponding bit in value will be returned by sp::LUT as a zero or a one. In this case, sp::LUT might not exhibit consistent behaviour (returning 0 under some circumstances, and 1 under others).

◆ value

template<int N = 32>
T sp::LUTSpec::ThreeValue< N >::value = 0

The value to insert into the lookup table.