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

#include <Codec.h>

+ Inheritance diagram for FixedWidthInt:
+ Collaboration diagram for FixedWidthInt:

Public Member Functions

 FixedWidthInt (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 34 of file Codec.h.

Constructor & Destructor Documentation

FixedWidthInt::FixedWidthInt ( const size_t  byte_width)

Definition at line 26 of file Codec.cpp.

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

Member Function Documentation

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

Implements Decoder.

Definition at line 28 of file Codec.cpp.

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

30  {
31  auto& context = llvm_module->getContext();
32  auto f = llvm_module->getFunction("fixed_width_int_decode");
33  CHECK(f);
34  llvm::Value* args[] = {
35  byte_stream,
36  llvm::ConstantInt::get(llvm::Type::getInt32Ty(context), byte_width_),
37  pos};
38  return llvm::CallInst::Create(f, args);
39 }
const size_t byte_width_
Definition: Codec.h:42
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 FixedWidthInt::byte_width_
private

Definition at line 42 of file Codec.h.

Referenced by codegenDecode().


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