16 std::ifstream fstream;
18 if (!fstream.good()) {
20 throw cms::Exception(
"FileOpenError") <<
"Failed to open LUT file: " << inFileName;
22 int readCode =
read(fstream);
34 throw cms::Exception(
"Uninitialized") <<
"If you're not loading a LUT from file you need to implement lookupPacked.";
41 stream <<
"#<header> V1 " << m_totalInWidth <<
" " << m_outWidth <<
" </header> " << std::endl;
42 for (
int in = 0;
in < (1 << m_totalInWidth); ++
in) {
43 int out = lookupPacked(
in);
52 unsigned maxIn = (1 <<
maxWidth) - 1;
53 return (
in < maxIn ?
in : maxIn);
virtual int lookupPacked(int input) const
int checkedInput(unsigned in, unsigned maxWidth) const
int load(const std::string &inFileName)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
static std::string const input
int read(std::istream &stream)
char data[epos_bytes_allocation]
void save(std::ofstream &output)
void write(std::ostream &stream) const