OmniSciDB  c07336695a
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 *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::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

◆ codegenDecode()

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

Implements Decoder.

Definition at line 44 of file Codec.cpp.

References run-benchmark-import::args, byte_width_, CHECK, and getGlobalLLVMContext().

46  {
47  auto& context = getGlobalLLVMContext();
48  auto f = 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
llvm::LLVMContext & getGlobalLLVMContext()
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the call graph for this function:

Member Data Documentation

◆ byte_width_

const size_t FixedWidthUnsigned::byte_width_
private

Definition at line 53 of file Codec.h.

Referenced by codegenDecode().


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