OpenVDB  11.0.0
Public Types | Public Member Functions | List of all members
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. More...
 
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. More...
 
const codegen::FunctionGroupencoder () const
 
const codegen::FunctionGroupdecoder () const
 
uint32_t flag () const
 

Member Typedef Documentation

using UniquePtr = std::unique_ptr<Codec>

Constructor & Destructor Documentation

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

Member Function Documentation

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.
const codegen::FunctionGroup* decoder ( ) const
inline
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.
const codegen::FunctionGroup* encoder ( ) const
inline
uint32_t flag ( ) const
inline