Loading...
Searching...
No Matches
Codec Class Reference

`#include <openvdb_ax/codegen/Codecs.h>`

## Public Types

using | UniquePtr = std::unique_ptr<Codec>

## Public Member Functions

| Codec (codegen::FunctionGroup::UniquePtr encoder, codegen::FunctionGroup::UniquePtr decoder, uint32_t flag)
llvm::Type * | decodedToEncoded (const ast::tokens::CoreType &in, llvm::LLVMContext &C) const
| Given a core type supported by the AX frontend, return a llvm compatible type which represents how the core type is encoded in memory.
llvm::Type * | encodedToDecoded (llvm::Type *in) const
| Given a llvm type, return a compatible llvm type which represents how the provided type should be exposed to the AX frontend.
const codegen::FunctionGroup * | encoder () const
const codegen::FunctionGroup * | decoder () const
uint32_t | flag () const

## Member Typedef Documentation

## UniquePtr

using UniquePtr = std::unique_ptr<Codec>

## Constructor & Destructor Documentation

## Codec()

Codec | ( | codegen::FunctionGroup::UniquePtr | encoder,
|  | codegen::FunctionGroup::UniquePtr | decoder,
|  | uint32_t | flag )

inline

## Member Function Documentation

## decodedToEncoded()

llvm::Type * decodedToEncoded | ( | const ast::tokens::CoreType & | in,
|  | llvm::LLVMContext & | C ) const

inline

Given a core type supported by the AX frontend, return a llvm compatible type which represents how the core type is encoded in memory.

Returns
  A llvm type representing the encoded C type. Can be a nullptr if this codec does not support the provided core type.

## decoder()

const codegen::FunctionGroup * decoder | ( |  | ) | const

inline

## encodedToDecoded()

llvm::Type * encodedToDecoded | ( | llvm::Type * | in | ) | const

inline

Given a llvm type, return a compatible llvm type which represents how the provided type should be exposed to the AX frontend.

Note
  The return type is guaranteed to either be a supported CoreType (such that ax::codegen::tokenFromLLVMType(in) returns a valid value) or a nullptr.

Returns
  A llvm type representing the decoded C type. Can be a nullptr if this codec does not support the provided core type.

## encoder()

const codegen::FunctionGroup * encoder | ( |  | ) | const

inline

## flag()

uint32_t flag | ( |  | ) | const

inline