12#ifndef OPENVDB_AX_COMPILER_VOLUME_EXECUTABLE_HAS_BEEN_INCLUDED
13#define OPENVDB_AX_COMPILER_VOLUME_EXECUTABLE_HAS_BEEN_INCLUDED
19#include <openvdb/version.h>
22#include <llvm/Config/llvm-config.h>
24#include <unordered_map>
26struct TestVolumeExecutableAcc;
87 using Ptr = std::shared_ptr<VolumeExecutable>;
279 static CLI create(
size_t argc,
const char* argv[],
bool* used=
nullptr);
280 static void usage(std::ostream& os,
const bool verbose);
284 std::unique_ptr<Settings<true>> mSettings;
318#if LLVM_VERSION_MAJOR <= 15
319 const std::shared_ptr<const llvm::LLVMContext>& context,
320 const std::shared_ptr<const llvm::ExecutionEngine>& engine,
322 const std::shared_ptr<const llvm::orc::LLJIT>& mExecutionEngine,
326 const std::unordered_map<std::string, uint64_t>& functions,
330#if LLVM_VERSION_MAJOR <= 15
333 const std::shared_ptr<const llvm::LLVMContext> mContext;
334 const std::shared_ptr<const llvm::ExecutionEngine> mExecutionEngine;
336 const std::shared_ptr<const llvm::orc::LLJIT> mExecutionEngine;
340 const std::unordered_map<std::string, uint64_t> mFunctionAddresses;
341 std::unique_ptr<Settings<false>> mSettings;
The Attribute Bindings class is used by the compiled Executables to handle the mapping of AX Attribut...
These classes contain lists of expected attributes and volumes which are populated by compiler during...
Access to the CustomData class which can provide custom user user data to the OpenVDB AX Compiler.
Abstract base class for typed grids.
Definition Grid.h:78
This class wraps an interface for a map of attribute bindings. These map attributes in AX code to con...
Definition AttributeBindings.h:37
std::shared_ptr< const AttributeRegistry > ConstPtr
Definition AttributeRegistry.h:43
std::shared_ptr< const CustomData > ConstPtr
Definition CustomData.h:38
friend struct ::TestVolumeExecutableAcc
Definition VolumeExecutable.h:301
void setActiveTileStreamingGrainSize(const size_t g2)
Set the threading grain sizes used when iterating over nodes in a VDB.
void setCreateMissing(const bool flag)
Set the behaviour when missing grids are accessed. Default behaviour is true, which creates them with...
const AttributeBindings & getAttributeBindings() const
void execute(openvdb::GridBase &grids) const
Run this volume executable binary on target volumes.
friend class Compiler
Definition VolumeExecutable.h:300
void getTreeExecutionLevel(Index &min, Index &max) const
Get the tree execution levels.
Streaming getActiveTileStreaming() const
IterType getValueIterator() const
std::shared_ptr< VolumeExecutable > Ptr
Definition VolumeExecutable.h:87
void setValueIterator(const IterType &iter)
Set the value iterator type to use with this executable. Options are ON, OFF, ALL....
void setActiveTileStreaming(const Streaming &s)
Controls the behaviour of expansion of active tiles.
void setGrainSize(const size_t g1)
Set the threading grain sizes used when iterating over nodes in a VDB.
Streaming getActiveTileStreaming(const std::string &name, const ast::tokens::CoreType &type) const
size_t getGrainSize() const
void setTreeExecutionLevel(const Index min, const Index max)
Set the execution level for this executable. This controls what nodes are processed when execute is c...
void setSettingsFromCLI(const CLI &cli)
Intialize the Settings of this executables from the CLI object.
Streaming
The streaming type of active tiles during execution.
Definition VolumeExecutable.h:202
@ OFF
Definition VolumeExecutable.h:202
@ ON
Definition VolumeExecutable.h:202
@ AUTO
Definition VolumeExecutable.h:202
bool getCreateMissing() const
void setTreeExecutionLevel(const Index level)
IterType
Definition VolumeExecutable.h:215
@ ALL
Definition VolumeExecutable.h:215
void execute(openvdb::GridPtrVec &grids) const
Run this volume executable binary on target volumes.
void setAttributeBindings(const AttributeBindings &bindings)
Set attribute bindings.
size_t getActiveTileStreamingGrainSize() const
VolumeExecutable(const VolumeExecutable &other)
Copy constructor. Shares the LLVM constructs but deep copies the settings. Multiple copies of an exec...
Definition PointExecutable.h:32
Definition FunctionRegistry.h:23
CoreType
Definition Tokens.h:32
Definition PointDataGrid.h:170
std::vector< GridBase::Ptr > GridPtrVec
Definition Grid.h:508
Index32 Index
Definition Types.h:54
Definition Exceptions.h:13
Command Line Interface handling for the VolumeExecutable.
Definition VolumeExecutable.h:275
friend class VolumeExecutable
Definition VolumeExecutable.h:282
static void usage(std::ostream &os, const bool verbose)
static CLI create(size_t argc, const char *argv[], bool *used=nullptr)
Definition VolumeExecutable.h:268
A Tree is the highest concrete (non-abstract) node in the entire AX AST hierarchy....
Definition AST.h:563
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition version.h.in:121
#define OPENVDB_USE_VERSION_NAMESPACE
Definition version.h.in:218