OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DiffFixedWidthInt Class Reference

#include <Codec.h>

+ Inheritance diagram for DiffFixedWidthInt:
+ Collaboration diagram for DiffFixedWidthInt:

Public Member Functions

 DiffFixedWidthInt (const size_t byte_width, const int64_t baseline)
 
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_
 
const int64_t baseline_
 

Detailed Description

Definition at line 56 of file Codec.h.

Constructor & Destructor Documentation

DiffFixedWidthInt::DiffFixedWidthInt ( const size_t  byte_width,
const int64_t  baseline 
)

Definition at line 57 of file Codec.cpp.

58  : byte_width_{byte_width}, baseline_{baseline} {}
const int64_t baseline_
Definition: Codec.h:65
const size_t byte_width_
Definition: Codec.h:64

Member Function Documentation

llvm::Instruction * DiffFixedWidthInt::codegenDecode ( llvm::Value *  byte_stream,
llvm::Value *  pos,
llvm::Module *  module 
) const
overridevirtual

Implements Decoder.

Definition at line 60 of file Codec.cpp.

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

62  {
63  auto& context = getGlobalLLVMContext();
64  auto f = module->getFunction("diff_fixed_width_int_decode");
65  CHECK(f);
66  llvm::Value* args[] = {
67  byte_stream,
68  llvm::ConstantInt::get(llvm::Type::getInt32Ty(context), byte_width_),
69  llvm::ConstantInt::get(llvm::Type::getInt32Ty(context), baseline_),
70  pos};
71  return llvm::CallInst::Create(f, args);
72 }
std::unique_ptr< llvm::Module > module(runtime_module_shallow_copy(cgen_state))
CHECK(cgen_state)
const int64_t baseline_
Definition: Codec.h:65
llvm::LLVMContext & getGlobalLLVMContext()
const size_t byte_width_
Definition: Codec.h:64

+ Here is the call graph for this function:

Member Data Documentation

const int64_t DiffFixedWidthInt::baseline_
private

Definition at line 65 of file Codec.h.

Referenced by codegenDecode().

const size_t DiffFixedWidthInt::byte_width_
private

Definition at line 64 of file Codec.h.

Referenced by codegenDecode().


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