4 #ifndef OPENVDB_AX_CODEGEN_CODECS_HAS_BEEN_INCLUDED     5 #define OPENVDB_AX_CODEGEN_CODECS_HAS_BEEN_INCLUDED     8 #include <openvdb/version.h>    23 using CodecTypeMap = std::map<const ast::tokens::CoreType, CodecNameMap>;
    24 using Codecs = std::vector<const Codec*>;
    47     : mEncoder(
std::move(encoder))
    48     , mDecoder(
std::move(decoder))
    50 #ifdef OPENVDB_ENABLE_ASSERTS    53         OPENVDB_ASSERT(mEncoder->list().size() == mDecoder->list().size());
    54         for ([[maybe_unused]] 
const auto& F : mEncoder->list()) {
    74         llvm::Type* ret = findReturnTypeFromArg(this->encoder(), type);
    90         llvm::Type* ret = findReturnTypeFromArg(this->decoder(), in);
    96     inline uint32_t 
flag()
 const { 
return mFlag; }
   103     const uint32_t mFlag;
   112 #endif // OPENVDB_AX_CODEGEN_CODECS_HAS_BEEN_INCLUDED 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 th...
Definition: Codecs.h:65
 
llvm::Type * encodedToDecoded(llvm::Type *in) const 
Given a llvm type, return a compatible llvm type which represents how the provided type should be exp...
Definition: Codecs.h:85
 
const codegen::FunctionGroup * decoder() const 
Definition: Codecs.h:95
 
std::unique_ptr< Codec > UniquePtr
Definition: Codecs.h:42
 
OPENVDB_AX_API llvm::Type * llvmTypeFromToken(const ast::tokens::CoreType &type, llvm::LLVMContext &C)
Returns an llvm type representing a type defined by a string. 
 
Contains frameworks for creating custom AX functions which can be registered within the FunctionRegis...
 
OPENVDB_AX_API const CodecNameMap * getTypeSupportedCodecs(const ast::tokens::CoreType type)
Get a specific set of codecs which encode a given type. Returns a nullptr if no codec exists...
 
std::unique_ptr< FunctionGroup > UniquePtr
Definition: FunctionTypes.h:1398
 
std::vector< const Codec * > Codecs
Definition: Codecs.h:24
 
#define OPENVDB_ASSERT(X)
Definition: Assert.h:41
 
Definition: Exceptions.h:13
 
Codec(codegen::FunctionGroup::UniquePtr encoder, codegen::FunctionGroup::UniquePtr decoder, uint32_t flag)
Definition: Codecs.h:44
 
A group of functions which all have the same name but different signatures. For example: float abs(fl...
Definition: FunctionTypes.h:1395
 
OPENVDB_AX_API const CodecTypeMap & getCodecTypeMap()
Get the global codec map. 
 
std::map< const ast::tokens::CoreType, CodecNameMap > CodecTypeMap
Definition: Codecs.h:23
 
OPENVDB_AX_API const Codec * getCodec(const ast::tokens::CoreType type, const std::string &name)
Get a specific codec. Returns a nullptr if no codec exists. 
 
Various function and operator tokens used throughout the AST and code generation. ...
 
const codegen::FunctionGroup * encoder() const 
Definition: Codecs.h:94
 
CoreType
Definition: Tokens.h:31
 
#define OPENVDB_VERSION_NAME
The version namespace name for this library version. 
Definition: version.h.in:121
 
uint32_t flag() const 
Definition: Codecs.h:96
 
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:218
 
std::map< const std::string, const Codec * > CodecNameMap
Definition: Codecs.h:22