OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 ( 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

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 }
std::unique_ptr< llvm::Module > module(runtime_module_shallow_copy(cgen_state))
CHECK(cgen_state)
const size_t byte_width_
Definition: Codec.h:53
llvm::LLVMContext & getGlobalLLVMContext()

+ Here is the call graph for this function:

Member Data Documentation

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: