Loading...
Searching...
No Matches
ComputeGenerator.h
Go to the documentation of this file.
// Copyright Contributors to the OpenVDB Project
// SPDX-License-Identifier: MPL-2.0
/// @file codegen/ComputeGenerator.h
///
/// @authors Nick Avramoussis, Matt Warner, Francisco Gochez, Richard Jones
///
/// @brief The core visitor framework for code generation
///
#ifndef OPENVDB_AX_COMPUTE_GENERATOR_HAS_BEEN_INCLUDED
#define OPENVDB_AX_COMPUTE_GENERATOR_HAS_BEEN_INCLUDED
#include "FunctionRegistry.h"
#include "FunctionTypes.h"
#include "SymbolTable.h"
#include "../ast/AST.h"
#include "../ast/Visitor.h"
#include "../compiler/CompilerOptions.h"
#include "../compiler/Logger.h"
#include <openvdb/version.h>
#include <llvm/Analysis/TargetLibraryInfo.h>
#include <llvm/IR/BasicBlock.h>
#include <llvm/IR/Function.h>
#include <llvm/IR/IRBuilder.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include <stack>
namespace openvdb {
OPENVDB_USE_VERSION_NAMESPACE
namespace OPENVDB_VERSION_NAME {
namespace ax {
namespace codegen {
/// @brief The function definition and signature which is built by the
/// ComputeGenerator.
///
/// The argument structure is as follows:
///
/// 1) - A void pointer to the CustomData
///
struct ComputeKernel
{
/// The name of the generated function
static const std::string Name;
/// The signature of the generated function
using Signature = void(const void* const);
using FunctionTraitsT = codegen::FunctionTraits<Signature>;
static const size_t N_ARGS = FunctionTraitsT::N_ARGS;
/// The argument key names available during code generation
static const std::array<std::string, N_ARGS>& getArgumentKeys();
static std::string getDefaultName();
};
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
namespace codegen_internal {
/// @brief Visitor object which will generate llvm IR for a syntax tree. This
/// provides the majority of the code generation functionality except for
/// attribute access. This design allows for custom geometry to define their
/// IR implementations for these accesses by deriving and extending this
/// generator with ast::Attribute handling (see PointComputeGenerator.h and
/// VolumeComputeGenerator.h for examples).
/// @note The visit/traverse methods work slightly differently to the normal
/// Visitor to allow proper handling of errors and visitation history. Nodes
/// that inherit from ast::Expression can return false from visit() (and so
/// traverse()), but this will not necessarily stop traversal altogether.
/// Instead, any ast::Statements that are not also ast::Expressions i.e.
/// Block, ConditionalStatement, Loop, DeclareLocal, etc override their visit
/// and traverse methods to handle custom traversal order, and the catching
/// of failed child Expression visit/traverse calls. This allows errors in
/// independent Statements to not halt traversal for future Statements and so
/// allow capturing of multiple errors in an ast::Tree in a single call to
/// ComputeGenerator::generate().
struct OPENVDB_AX_API ComputeGenerator : public ast::Visitor<ComputeGenerator>
{
ComputeGenerator(llvm::Module& module,
const FunctionOptions& options,
FunctionRegistry& functionRegistry,
Logger& logger);
virtual ~ComputeGenerator() = default;
bool generate(const ast::Tree&);
inline SymbolTable& globals() { return mSymbolTables.globals(); }
inline const SymbolTable& globals() const { return mSymbolTables.globals(); }
// Visitor pattern
using ast::Visitor<ComputeGenerator>::traverse;
using ast::Visitor<ComputeGenerator>::visit;
/// @brief Code generation always runs post order
inline bool postOrderNodes() const { return true; }
/// @brief Custom traversal of scoped blocks
/// @note This overrides the default traversal to incorporate
/// the scoping of variables declared in this block
bool traverse(const ast::Block* block)
{
if (!block) return true;
if (!this->visit(block)) return false;
return true;
}
/// @brief Custom traversal of comma expression
/// @note This overrides the default traversal to handle errors
/// without stopping generation of entire list
/// @todo Replace with a binary operator that simply returns the second value
bool traverse(const ast::CommaOperator* comma)
{
if (!comma) return true;
if (!this->visit(comma)) return false;
return true;
}
/// @brief Custom traversal of conditional statements
/// @note This overrides the default traversal to handle
/// branching between different code paths
bool traverse(const ast::ConditionalStatement* cond)
{
if (!cond) return true;
if (!this->visit(cond)) return false;
return true;
}
/// @brief Custom traversal of binary operators
/// @note This overrides the default traversal to handle
/// short-circuiting in logical AND and OR
bool traverse(const ast::BinaryOperator* bin)
{
if (!bin) return true;
if (!this->visit(bin)) return false;
return true;
}
/// @brief Custom traversal of ternary operators
/// @note This overrides the default traversal to handle
/// branching between different code paths
bool traverse(const ast::TernaryOperator* tern)
{
if (!tern) return true;
if (!this->visit(tern)) return false;
return true;
}
/// @brief Custom traversal of loops
/// @note This overrides the default traversal to handle
/// branching between different code paths and the
/// scoping of variables in for-loop initialisation
bool traverse(const ast::Loop* loop)
{
if (!loop) return true;
if (!this->visit(loop)) return false;
return true;
}
/// @brief Custom traversal of declarations
/// @note This overrides the default traversal to
/// handle traversal of the local and
/// assignment of initialiser, if it exists
bool traverse(const ast::DeclareLocal* decl)
{
if (!decl) return true;
if (!this->visit(decl)) return false;
return true;
}
///@{
/// @brief Visitor methods for all AST nodes which implement IR generation
virtual bool visit(const ast::CommaOperator*);
virtual bool visit(const ast::AssignExpression*);
virtual bool visit(const ast::Crement*);
virtual bool visit(const ast::FunctionCall*);
virtual bool visit(const ast::Attribute*);
virtual bool visit(const ast::Tree*);
virtual bool visit(const ast::Block*);
virtual bool visit(const ast::ConditionalStatement*);
virtual bool visit(const ast::Loop*);
virtual bool visit(const ast::Keyword*);
virtual bool visit(const ast::UnaryOperator*);
virtual bool visit(const ast::BinaryOperator*);
virtual bool visit(const ast::TernaryOperator*);
virtual bool visit(const ast::Cast*);
virtual bool visit(const ast::DeclareLocal*);
virtual bool visit(const ast::Local*);
virtual bool visit(const ast::ExternalVariable*);
virtual bool visit(const ast::ArrayUnpack*);
virtual bool visit(const ast::ArrayPack*);
virtual bool visit(const ast::Value<bool>*);
virtual bool visit(const ast::Value<int16_t>*);
virtual bool visit(const ast::Value<int32_t>*);
virtual bool visit(const ast::Value<int64_t>*);
virtual bool visit(const ast::Value<float>*);
virtual bool visit(const ast::Value<double>*);
virtual bool visit(const ast::Value<std::string>*);
template <typename ValueType>
typename std::enable_if<std::is_integral<ValueType>::value, bool>::type
visit(const ast::Value<ValueType>* node);
template <typename ValueType>
typename std::enable_if<std::is_floating_point<ValueType>::value, bool>::type
visit(const ast::Value<ValueType>* node);
///@}
protected:
const FunctionGroup* getFunction(const std::string& identifier,
const bool allowInternal = false);
bool binaryExpression(llvm::Value*& result, llvm::Value* lhs, llvm::Value* rhs,
const ast::tokens::OperatorToken op, const ast::Node* node);
bool assignExpression(llvm::Value* lhs, llvm::Value*& rhs, const ast::Node* node);
/// @brief Clear any strings which were allocated in a given function.
/// This method accepts an IRBuilder which is expected to be attached to
/// a valid block/function. For each block in the function with a return
/// instruction, this function calls the appropriate memory methods to
/// deallocate any strings (which are alloced in the function prologue).
void createFreeSymbolStrings(llvm::IRBuilder<>&);
llvm::Module& mModule;
llvm::LLVMContext& mContext;
llvm::IRBuilder<> mBuilder;
// The stack of accessed values
std::stack<llvm::Value*> mValues;
// The stack of blocks for keyword branching
std::stack<std::pair<llvm::BasicBlock*, llvm::BasicBlock*>> mBreakContinueStack;
// The current scope number used to track scoped declarations
size_t mScopeIndex;
// The map of scope number to local variable names to values
SymbolTableBlocks mSymbolTables;
// The function used as the base code block
llvm::Function* mFunction;
const FunctionOptions mOptions;
Logger& mLog;
private:
FunctionRegistry& mFunctionRegistry;
};
} // codegen_internal
} // namespace codegen
} // namespace ax
} // namespace OPENVDB_VERSION_NAME
} // namespace openvdb
#endif // OPENVDB_AX_COMPUTE_GENERATOR_HAS_BEEN_INCLUDED
AST.h
Provides the definition for every abstract and concrete derived class which represent a particular ab...
CompilerOptions.h
OpenVDB AX Compiler Options.
FunctionRegistry.h
Contains the global function registration definition which described all available user front end fun...
FunctionTypes.h
Contains frameworks for creating custom AX functions which can be registered within the FunctionRegis...
Logger.h
Logging system to collect errors and warnings throughout the different stages of parsing and compilat...
OPENVDB_AX_API
#define OPENVDB_AX_API
Definition Platform.h:272
SymbolTable.h
Contains the symbol table which holds mappings of variables names to llvm::Values.
Visitor.h
Contains the AX AST Node Visitor, providing default and customizable traversal and visitation methods...
openvdb::v10_0::ax::Logger
Logger for collecting errors and warnings that occur during AX compilation.
Definition Logger.h:58
openvdb::v10_0::ax::codegen::FunctionRegistry
The function registry which is used for function code generation. Each time a function is visited wit...
Definition FunctionRegistry.h:36
openvdb::v10_0::ax::ast::tokens::OperatorToken
OperatorToken
Definition Tokens.h:151
openvdb::v10_0::ax::codegen::codegen_internal
Definition ComputeGenerator.h:67
openvdb
Definition Exceptions.h:13
openvdb::v10_0::ax::FunctionOptions
Options that control how functions behave.
Definition CompilerOptions.h:25
openvdb::v10_0::ax::ast::ArrayPack
ArrayPacks represent temporary container creations of arbitrary sizes, typically generated through th...
Definition AST.h:1785
openvdb::v10_0::ax::ast::ArrayUnpack
ArrayUnpack represent indexing operations into AX container types, primarily vectors and matrices ind...
Definition AST.h:1686
openvdb::v10_0::ax::ast::AssignExpression
AssignExpressions represents a similar object construction to a BinaryOperator. AssignExpressions can...
Definition AST.h:1198
openvdb::v10_0::ax::ast::Attribute
Attributes represent any access to a primitive value, typically associated with the '@' symbol syntax...
Definition AST.h:1874
openvdb::v10_0::ax::ast::BinaryOperator
A BinaryOperator represents a single binary operation between a left hand side (LHS) and right hand s...
Definition AST.h:988
openvdb::v10_0::ax::ast::Block
A Block node represents a scoped list of statements. It may comprise of 0 or more statements,...
Definition AST.h:476
openvdb::v10_0::ax::ast::Cast
Cast nodes represent the conversion of an underlying expression to a target type. Cast nodes are typi...
Definition AST.h:1464
openvdb::v10_0::ax::ast::CommaOperator
Definition AST.h:607
openvdb::v10_0::ax::ast::ConditionalStatement
ConditionalStatements represents all combinations of 'if', 'else' and 'else if' syntax and semantics....
Definition AST.h:864
openvdb::v10_0::ax::ast::Crement
A Crement node represents a single increment '++' and decrement '–' operation. As well as it's cremen...
Definition AST.h:1294
openvdb::v10_0::ax::ast::DeclareLocal
DeclareLocal AST nodes symbolize a single type declaration of a local variable. These store the local...
Definition AST.h:2139
openvdb::v10_0::ax::ast::ExternalVariable
ExternalVariable represent any access to external (custom) data, typically associated with the '$' sy...
Definition AST.h:2002
openvdb::v10_0::ax::ast::FunctionCall
FunctionCalls represent a single call to a function and any provided arguments. The argument list can...
Definition AST.h:1541
openvdb::v10_0::ax::ast::Keyword
Keywords represent keyword statements defining changes in execution. These include those that define ...
Definition AST.h:1641
openvdb::v10_0::ax::ast::Local
Local AST nodes represent a single accesses to a local variable. The only store the name of the varia...
Definition AST.h:2112
openvdb::v10_0::ax::ast::Loop
Loops represent for, while and do-while loop constructs. These all consist of a condition - evaluated...
Definition AST.h:708
openvdb::v10_0::ax::ast::Node
The base abstract node which determines the interface and required methods for all derived concrete n...
Definition AST.h:102
openvdb::v10_0::ax::ast::TernaryOperator
A TernaryOperator represents a ternary (conditional) expression 'a ? b : c' which evaluates to 'b' if...
Definition AST.h:1092
openvdb::v10_0::ax::ast::Tree
A Tree is the highest concrete (non-abstract) node in the entire AX AST hierarchy....
Definition AST.h:562
openvdb::v10_0::ax::ast::UnaryOperator
A UnaryOperator represents a single unary operation on an expression. The operation type is stored as...
Definition AST.h:1389
openvdb::v10_0::ax::ast::Value
A Value (literal) AST node holds either literal text or absolute value information on all numerical,...
Definition AST.h:2253
openvdb::v10_0::ax::ast::Visitor
The Visitor class uses the Curiously Recursive Template Pattern (CRTP) to provide a customizable inte...
Definition Visitor.h:96
openvdb::v10_0::ax::codegen::ComputeKernel
The function definition and signature which is built by the ComputeGenerator.
Definition ComputeGenerator.h:49
openvdb::v10_0::ax::codegen::ComputeKernel::FunctionTraitsT
codegen::FunctionTraits< Signature > FunctionTraitsT
Definition ComputeGenerator.h:55
openvdb::v10_0::ax::codegen::ComputeKernel::getDefaultName
static std::string getDefaultName()
openvdb::v10_0::ax::codegen::ComputeKernel::N_ARGS
static const size_t N_ARGS
Definition ComputeGenerator.h:56
openvdb::v10_0::ax::codegen::ComputeKernel::Signature
void(const void *const) Signature
The signature of the generated function.
Definition ComputeGenerator.h:54
openvdb::v10_0::ax::codegen::ComputeKernel::Name
static const std::string Name
The name of the generated function.
Definition ComputeGenerator.h:51
openvdb::v10_0::ax::codegen::ComputeKernel::getArgumentKeys
static const std::array< std::string, N_ARGS > & getArgumentKeys()
The argument key names available during code generation.
openvdb::v10_0::ax::codegen::FunctionGroup
todo
Definition FunctionTypes.h:793
openvdb::v10_0::ax::codegen::FunctionTraits
Templated function traits which provides compile-time index access to the types of the function signa...
Definition Types.h:279
openvdb::v10_0::ax::codegen::SymbolTableBlocks
A map of unique ids to symbol tables which can be used to represent local variables within a program....
Definition SymbolTable.h:113
openvdb::v10_0::ax::codegen::SymbolTable
A symbol table which can be used to represent a single scoped set of a programs variables....
Definition SymbolTable.h:36
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator
Visitor object which will generate llvm IR for a syntax tree. This provides the majority of the code ...
Definition ComputeGenerator.h:87
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::ExternalVariable *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::mSymbolTables
SymbolTableBlocks mSymbolTables
Definition ComputeGenerator.h:249
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Value< std::string > *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::mBreakContinueStack
std::stack< std::pair< llvm::BasicBlock *, llvm::BasicBlock * > > mBreakContinueStack
Definition ComputeGenerator.h:243
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::globals
SymbolTable & globals()
Definition ComputeGenerator.h:97
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::ComputeGenerator
ComputeGenerator(llvm::Module &module, const FunctionOptions &options, FunctionRegistry &functionRegistry, Logger &logger)
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Tree *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Keyword *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::~ComputeGenerator
virtual ~ComputeGenerator()=default
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::traverse
bool traverse(const ast::BinaryOperator *bin)
Custom traversal of binary operators.
Definition ComputeGenerator.h:143
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::createFreeSymbolStrings
void createFreeSymbolStrings(llvm::IRBuilder<> &)
Clear any strings which were allocated in a given function. This method accepts an IRBuilder which is...
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Crement *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::generate
bool generate(const ast::Tree &)
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Cast *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::BinaryOperator *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::mModule
llvm::Module & mModule
Definition ComputeGenerator.h:235
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Local *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::traverse
bool traverse(const ast::Loop *loop)
Custom traversal of loops.
Definition ComputeGenerator.h:164
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::mOptions
const FunctionOptions mOptions
Definition ComputeGenerator.h:254
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::TernaryOperator *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Value< int16_t > *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::traverse
bool traverse(const ast::CommaOperator *comma)
Custom traversal of comma expression.
Definition ComputeGenerator.h:122
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::mFunction
llvm::Function * mFunction
Definition ComputeGenerator.h:252
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::AssignExpression *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::traverse
bool traverse(const ast::ConditionalStatement *cond)
Custom traversal of conditional statements.
Definition ComputeGenerator.h:133
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Loop *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Attribute *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::mBuilder
llvm::IRBuilder mBuilder
Definition ComputeGenerator.h:237
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::postOrderNodes
bool postOrderNodes() const
Code generation always runs post order.
Definition ComputeGenerator.h:106
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::ConditionalStatement *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::traverse
bool traverse(const ast::DeclareLocal *decl)
Custom traversal of declarations.
Definition ComputeGenerator.h:175
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Value< bool > *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::getFunction
const FunctionGroup * getFunction(const std::string &identifier, const bool allowInternal=false)
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::mContext
llvm::LLVMContext & mContext
Definition ComputeGenerator.h:236
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Block *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::traverse
bool traverse(const ast::TernaryOperator *tern)
Custom traversal of ternary operators.
Definition ComputeGenerator.h:153
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::FunctionCall *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::DeclareLocal *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::UnaryOperator *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::binaryExpression
bool binaryExpression(llvm::Value *&result, llvm::Value *lhs, llvm::Value *rhs, const ast::tokens::OperatorToken op, const ast::Node *node)
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::ArrayPack *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::globals
const SymbolTable & globals() const
Definition ComputeGenerator.h:98
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::mLog
Logger & mLog
Definition ComputeGenerator.h:256
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Value< int32_t > *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::traverse
bool traverse(const ast::Block *block)
Custom traversal of scoped blocks.
Definition ComputeGenerator.h:111
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::mValues
std::stack< llvm::Value * > mValues
Definition ComputeGenerator.h:240
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
std::enable_if< std::is_integral< ValueType >::value, bool >::type visit(const ast::Value< ValueType > *node)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
std::enable_if< std::is_floating_point< ValueType >::value, bool >::type visit(const ast::Value< ValueType > *node)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::mScopeIndex
size_t mScopeIndex
Definition ComputeGenerator.h:246
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Value< int64_t > *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::ArrayUnpack *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::assignExpression
bool assignExpression(llvm::Value *lhs, llvm::Value *&rhs, const ast::Node *node)
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Value< float > *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::CommaOperator *)
Visitor methods for all AST nodes which implement IR generation.
openvdb::v10_0::ax::codegen::codegen_internal::ComputeGenerator::visit
virtual bool visit(const ast::Value< double > *)
Visitor methods for all AST nodes which implement IR generation.
OPENVDB_VERSION_NAME
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition version.h.in:121
OPENVDB_USE_VERSION_NAMESPACE
#define OPENVDB_USE_VERSION_NAMESPACE
Definition version.h.in:212