OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FixedWidthUnsigned Class Reference

#include <Codec.h>

+ Inheritance diagram for FixedWidthUnsigned:
+ Collaboration diagram for FixedWidthUnsigned:

Public Member Functions

 FixedWidthUnsigned (const size_t byte_width)
llvm::Instruction * codegenDecode (llvm::Value *byte_stream, llvm::Value *pos, llvm::Module *llvm_module) const override
- Public Member Functions inherited from Decoder
virtual ~Decoder ()

Private Attributes

const size_t byte_width_

Detailed Description

Definition at line 45 of file Codec.h.

Constructor & Destructor Documentation

FixedWidthUnsigned::FixedWidthUnsigned ( const size_t  byte_width)

Definition at line 41 of file Codec.cpp.

42  : byte_width_{byte_width} {}
const size_t byte_width_
Definition: Codec.h:53

Member Function Documentation

llvm::Instruction * FixedWidthUnsigned::codegenDecode ( llvm::Value *  byte_stream,
llvm::Value *  pos,
llvm::Module *  llvm_module 
) const

Implements Decoder.

Definition at line 44 of file Codec.cpp.

References run_benchmark_import::args, byte_width_, CHECK, and f().

46  {
47  auto& context = llvm_module->getContext();
48  auto f = llvm_module->getFunction("fixed_width_unsigned_decode");
49  CHECK(f);
50  llvm::Value* args[] = {
51  byte_stream,
52  llvm::ConstantInt::get(llvm::Type::getInt32Ty(context), byte_width_),
53  pos};
54  return llvm::CallInst::Create(f, args);
55 }
const size_t byte_width_
Definition: Codec.h:53
torch::Tensor f(torch::Tensor x, torch::Tensor W_target, torch::Tensor b_target)
#define CHECK(condition)
Definition: Logger.h:291

+ Here is the call graph for this function:

Member Data Documentation

const size_t FixedWidthUnsigned::byte_width_

Definition at line 53 of file Codec.h.

Referenced by codegenDecode().

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