OmniSciDB  c07336695a
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::DiffFixedWidthInt ( const size_t  byte_width,
const int64_t  baseline 
)

Definition at line 57 of file Codec.cpp.

References baseline_.

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

◆ codegenDecode()

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 }
const int64_t baseline_
Definition: Codec.h:65
llvm::LLVMContext & getGlobalLLVMContext()
const size_t byte_width_
Definition: Codec.h:64
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the call graph for this function:

Member Data Documentation

◆ baseline_

const int64_t DiffFixedWidthInt::baseline_
private

Definition at line 65 of file Codec.h.

Referenced by codegenDecode(), and DiffFixedWidthInt().

◆ byte_width_

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: