OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 *llvm_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 *  llvm_module 
) const
overridevirtual

Implements Decoder.

Definition at line 60 of file Codec.cpp.

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

62  {
63  auto& context = llvm_module->getContext();
64  auto f = llvm_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
torch::Tensor f(torch::Tensor x, torch::Tensor W_target, torch::Tensor b_target)
const size_t byte_width_
Definition: Codec.h:64
#define CHECK(condition)
Definition: Logger.h:291

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