OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 *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 *  module 
) const
overridevirtual

Implements Decoder.

Definition at line 28 of file Codec.cpp.

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

30  {
31  auto& context = getGlobalLLVMContext();
32  auto f = 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 }
std::unique_ptr< llvm::Module > module(runtime_module_shallow_copy(cgen_state))
const size_t byte_width_
Definition: Codec.h:42
CHECK(cgen_state)
llvm::LLVMContext & getGlobalLLVMContext()

+ 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: