OpenVDB 12.0.0
 
Loading...
Searching...
No Matches
Functions.h
Go to the documentation of this file.
1// Copyright Contributors to the OpenVDB Project
2// SPDX-License-Identifier: Apache-2.0
3
4/// @file codegen/Functions.h
5///
6/// @authors Nick Avramoussis, Richard Jones, Francisco Gochez
7///
8/// @brief Contains the function objects that define the functions used in
9/// compute function generation, to be inserted into the FunctionRegistry.
10/// These define general purpose functions such as math functions.
11///
12
13#ifndef OPENVDB_AX_CODEGEN_GENERIC_FUNCTIONS_HAS_BEEN_INCLUDED
14#define OPENVDB_AX_CODEGEN_GENERIC_FUNCTIONS_HAS_BEEN_INCLUDED
15
16#include "FunctionRegistry.h"
17
19
20#include <openvdb/version.h>
21
22namespace openvdb {
24namespace OPENVDB_VERSION_NAME {
25
26namespace ax {
27namespace codegen {
28
29/// @brief Creates a registry with the default set of registered functions
30/// including math functions, point functions and volume functions
31/// @param op The current function options
32///
33inline FunctionRegistry::UniquePtr createDefaultRegistry(const FunctionOptions* op = nullptr);
34
35/// @brief Populates a function registry with all available "standard" AX
36/// library function. This primarily consists of all mathematical ops
37/// on AX containers (scalars, vectors, matrices) and other stl built-ins
38/// @param reg The function registry to populate
39/// @param options The current function options
40///
42
43/// @brief Populates a function registry with all available OpenVDB Point AX
44/// library function
45/// @param reg The function registry to populate
46/// @param options The current function options
47///
49
50/// @brief Populates a function registry with all available OpenVDB Volume AX
51/// library function
52/// @param reg The function registry to populate
53/// @param options The current function options
54///
56
57
58///////////////////////////////////////////////////////////////////////////
59///////////////////////////////////////////////////////////////////////////
60
61
63{
65 insertStandardFunctions(*registry, op);
66 insertVDBPointFunctions(*registry, op);
67 insertVDBVolumeFunctions(*registry, op);
68 return registry;
69}
70
71} // namespace codegen
72} // namespace ax
73} // namespace OPENVDB_VERSION_NAME
74} // namespace openvdb
75
76#endif // OPENVDB_AX_CODEGEN_GENERIC_FUNCTIONS_HAS_BEEN_INCLUDED
77
OpenVDB AX Compiler Options.
Contains the global function registration definition which described all available user front end fun...
#define OPENVDB_AX_API
Definition Platform.h:289
The function registry which is used for function code generation. Each time a function is visited wit...
Definition FunctionRegistry.h:36
std::unique_ptr< FunctionRegistry > UniquePtr
Definition FunctionRegistry.h:40
FunctionRegistry::UniquePtr createDefaultRegistry(const FunctionOptions *op=nullptr)
Creates a registry with the default set of registered functions including math functions,...
Definition Functions.h:62
OPENVDB_AX_API void insertVDBPointFunctions(FunctionRegistry &reg, const FunctionOptions *options=nullptr)
Populates a function registry with all available OpenVDB Point AX library function.
OPENVDB_AX_API void insertVDBVolumeFunctions(FunctionRegistry &reg, const FunctionOptions *options=nullptr)
Populates a function registry with all available OpenVDB Volume AX library function.
OPENVDB_AX_API void insertStandardFunctions(FunctionRegistry &reg, const FunctionOptions *options=nullptr)
Populates a function registry with all available "standard" AX library function. This primarily consi...
Definition Exceptions.h:13
Options that control how functions behave.
Definition CompilerOptions.h:25
#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