|
HDK
|
Classes | |
| struct | Binding |
Functions | |
| CE_API const char * | runoverToString (RunOver runover) |
| CE_API RunOver | stringToRunOver (const char *token) |
| CE_API const char * | bindingTypeToString (BindingType type) |
| CE_API const char * | bindingAttribClassToString (BindingAttribClass type) |
| CE_API const char * | bindingAttribTypeToString (BindingAttribType type) |
| CE_API const char * | bindingVDBTypeToString (BindingVDBType type) |
| CE_API const char * | bindingPrecisionToString (BindingPrecision type) |
| CE_API const char * | bindingTimescaleToString (BindingTimescale type) |
| CE_API const char * | bindingRampTypeToString (BindingRampType type) |
| CE_API const char * | bindingLayerTypeToString (BindingLayerType type) |
| CE_API const char * | bindingLayerBorderToString (BindingLayerBorder type) |
| CE_API const char * | bindingOptionTypeToString (BindingOptionType type) |
| CE_API UT_StringHolder | protectAts (UT_StringHolder code) |
| CE_API UT_StringHolder | findIncludeFile (const char *path, bool searchcwd, UT_ErrorManager *error) |
| CE_API UT_StringHolder | loadImport (const char *path, bool searchcwd, UT_ErrorManager *error) |
| Loads an import, searching the include path to locate it. More... | |
| CE_API UT_StringHolder | expandImportDirectives (UT_StringHolder code, UT_ErrorManager *error) |
| Expands all #import directives. More... | |
| CE_API UT_StringHolder | extractBindings (UT_StringHolder code, UT_Array< Binding > &bindings, RunOver &runover, UT_ErrorManager *error) |
| CE_API UT_StringHolder | generateAtCode (UT_StringHolder code, RunOver runover, UT_Options *opt, UT_StringMap< UT_StringHolder > *globals, UT_StringMap< UT_StringHolder > *missing_globals, const UT_Array< Binding > &bindings, const char *kernelsig, const char *writebacksig, UT_ErrorManager *error) |
| CE_API UT_StringHolder | restoreAts (UT_StringHolder code) |
| Restore protected to be @ again. More... | |
| CE_API bool | parseType (const UT_StringRef &attribtypename, BindingAttribType &attribtype, BindingPrecision &precision, int &tuplesize) |
| CE_API UT_StringHolder | computeSyntax (const char *code) |
| CE_API void | buildArgumentSign (const Binding &binding, int p, int maxparam, UT_WorkBuffer &sign, UT_StringHolder &firstwriteable, bool &firstwriteable_forced, BindingVDBType &firstvdbtype, bool prefixbound, RunOver runover, bool fieldsarealigned, UT_WorkBuffer ¶minitcode) |
| Append into sign the argument signature for a binding. More... | |
| CE_API void | buildKernelRunOverArguments (UT_WorkBuffer &signature, RunOver runover, bool singleworkgroup, bool filedsarealigned, bool prefixbound) |
| CE_API void | addKernelArgument (UT_WorkBuffer &signature, const char *type, const char *name, bool prefixbound) |
| CE_API void | buildKernelRunOverCode (UT_WorkBuffer &signature, RunOver runover, BindingVDBType firstvdbtype, bool singleworkgroup, bool fieldsarealigned, bool firstname_forced, bool prefixbound, UT_StringRef firstname) |
| Append into sign the code to start the provided runover mode. More... | |
| template<CE_Precision PREC, typename OP > | |
| bool | setKernelArgument (const CE_Snippet::Binding &binding, int p, cl::Kernel &kernel, int &argidx, UT_Array< cl::Buffer > &owned_buffers, UT_Array< cl::Buffer > &referenced_buffers, fpreal timestep, UT_ErrorManager *error, UT_ErrorSeverity missingseverity, const OP &op) |
| } More... | |
| template<typename OP > | |
| bool | setKernelArguments (const UT_Array< Binding > &bindings, BindingPrecision nodeprecision, cl::Kernel &kernel, int &argidx, UT_Array< cl::Buffer > &owned_buffers, UT_Array< cl::Buffer > &referenced_buffers, fpreal timestep, UT_ErrorManager *error, UT_ErrorSeverity missingseverity, const OP &op) |
| CE_API void | reportSetArgError (const char *name, int argidx, int pidx, const char *type, const char *extra, UT_ErrorManager *error) |
| Adds an error to the error manager for mis-binding an argument. More... | |
| template<typename TYPE > | |
| void | bindKernelArgRaw (TYPE *val, int tuplesize, cl::Kernel &kernel, int &argidx, const char *name, const char *type, int pidx, UT_ErrorManager *error, const char *extra=0) |
| void | bindKernelArgI (cl_int val, cl::Kernel &kernel, int &argidx, const char *name, int pidx, UT_ErrorManager *error, const char *extra=0) |
| void | bindKernelArgI2 (cl_int *val, cl::Kernel &kernel, int &argidx, const char *name, int pidx, UT_ErrorManager *error, const char *extra=0) |
| void | bindKernelArgI4 (cl_int *val, cl::Kernel &kernel, int &argidx, const char *name, int pidx, UT_ErrorManager *error, const char *extra=0) |
| void | bindKernelArgF (cl_float val, cl::Kernel &kernel, int &argidx, const char *name, int pidx, UT_ErrorManager *error, const char *extra=0) |
| void | bindKernelArgV2 (cl_float *val, cl::Kernel &kernel, int &argidx, const char *name, int pidx, UT_ErrorManager *error, const char *extra=0) |
| void | bindKernelArgV3 (cl_float *val, cl::Kernel &kernel, int &argidx, const char *name, int pidx, UT_ErrorManager *error, const char *extra=0) |
| NOTE: This binds float4 due to vagaries of cl! More... | |
| void | bindKernelArgV4 (cl_float *val, cl::Kernel &kernel, int &argidx, const char *name, int pidx, UT_ErrorManager *error, const char *extra=0) |
| void | bindKernelArgV16 (cl_float *val, cl::Kernel &kernel, int &argidx, const char *name, int pidx, UT_ErrorManager *error, const char *extra=0) |
| void | bindKernelArgB (cl::Buffer val, cl::Kernel &kernel, int &argidx, const char *name, int pidx, const char *type, UT_ErrorManager *error, const char *extra=0) |
|
strong |
| Enumerator | |
|---|---|
| DETAIL | |
| PRIMITIVE | |
| POINT | |
| VERTEX | |
Definition at line 71 of file CE_Snippet.h.
|
strong |
| Enumerator | |
|---|---|
| FLOAT | |
| INT | |
| FLOATARRAY | |
| INTARRAY | |
| STRING | |
| STRINGARRAY | |
Definition at line 80 of file CE_Snippet.h.
|
strong |
| Enumerator | |
|---|---|
| INPUT | |
| CONSTANT | |
| CLAMP | |
| MIRROR | |
| WRAP | |
Definition at line 137 of file CE_Snippet.h.
|
strong |
| Enumerator | |
|---|---|
| INT | |
| FLOAT | |
| FLOAT2 | |
| FLOAT3 | |
| FLOAT4 | |
| FLOATN | |
Definition at line 126 of file CE_Snippet.h.
|
strong |
| Enumerator | |
|---|---|
| FLOAT | |
| INT | |
Definition at line 147 of file CE_Snippet.h.
|
strong |
| Enumerator | |
|---|---|
| NODE | |
| _16 | |
| _32 | |
| _64 | |
Definition at line 101 of file CE_Snippet.h.
|
strong |
| Enumerator | |
|---|---|
| FLOAT | |
| VECTOR | |
Definition at line 119 of file CE_Snippet.h.
|
strong |
| Enumerator | |
|---|---|
| NONE | |
| MULT | |
| INVERT | |
| POW | |
Definition at line 110 of file CE_Snippet.h.
|
strong |
| Enumerator | |
|---|---|
| INVALID | |
| INT | |
| INTARRAY | |
| FLOAT | |
| FLOAT2 | |
| FLOAT3 | |
| FLOAT4 | |
| FLOAT8 | |
| FLOAT16 | |
| STRING | |
| FIELD_S | |
| FIELD_V | |
| FIELD_M | |
| RAMP | |
| ATTRIBUTE | |
| VOLUME | |
| VDB | |
| OPTION | |
| LAYER | |
| GEO | |
| NUM_TYPES | |
Definition at line 45 of file CE_Snippet.h.
|
strong |
| Enumerator | |
|---|---|
| ANY | |
| FLOAT | |
| VECTOR | |
| INT | |
| FLOATN | |
Definition at line 91 of file CE_Snippet.h.
|
strong |
| Enumerator | |
|---|---|
| INVALID | |
| ATTRIBUTE | |
| VOLUME | |
| WORKSETS | |
| FIELDS | |
| VDB | |
| LAYER | |
Definition at line 32 of file CE_Snippet.h.
| CE_API void CE_Snippet::addKernelArgument | ( | UT_WorkBuffer & | signature, |
| const char * | type, | ||
| const char * | name, | ||
| bool | prefixbound | ||
| ) |
| CE_API const char* CE_Snippet::bindingAttribClassToString | ( | BindingAttribClass | type | ) |
| CE_API const char* CE_Snippet::bindingAttribTypeToString | ( | BindingAttribType | type | ) |
| CE_API const char* CE_Snippet::bindingLayerBorderToString | ( | BindingLayerBorder | type | ) |
| CE_API const char* CE_Snippet::bindingLayerTypeToString | ( | BindingLayerType | type | ) |
| CE_API const char* CE_Snippet::bindingOptionTypeToString | ( | BindingOptionType | type | ) |
| CE_API const char* CE_Snippet::bindingPrecisionToString | ( | BindingPrecision | type | ) |
| CE_API const char* CE_Snippet::bindingRampTypeToString | ( | BindingRampType | type | ) |
| CE_API const char* CE_Snippet::bindingTimescaleToString | ( | BindingTimescale | type | ) |
| CE_API const char* CE_Snippet::bindingTypeToString | ( | BindingType | type | ) |
| CE_API const char* CE_Snippet::bindingVDBTypeToString | ( | BindingVDBType | type | ) |
|
inline |
Definition at line 141 of file CE_SnippetKernelBind.h.
|
inline |
Definition at line 120 of file CE_SnippetKernelBind.h.
|
inline |
Binds a kernel argument of the type, incrementing the argidx Will throw an error and add the error to the provided error manager. {
Definition at line 108 of file CE_SnippetKernelBind.h.
|
inline |
Definition at line 112 of file CE_SnippetKernelBind.h.
|
inline |
Definition at line 116 of file CE_SnippetKernelBind.h.
|
inline |
Definition at line 88 of file CE_SnippetKernelBind.h.
|
inline |
Definition at line 137 of file CE_SnippetKernelBind.h.
|
inline |
Definition at line 124 of file CE_SnippetKernelBind.h.
|
inline |
NOTE: This binds float4 due to vagaries of cl!
Definition at line 129 of file CE_SnippetKernelBind.h.
|
inline |
Definition at line 133 of file CE_SnippetKernelBind.h.
| CE_API void CE_Snippet::buildArgumentSign | ( | const Binding & | binding, |
| int | p, | ||
| int | maxparam, | ||
| UT_WorkBuffer & | sign, | ||
| UT_StringHolder & | firstwriteable, | ||
| bool & | firstwriteable_forced, | ||
| BindingVDBType & | firstvdbtype, | ||
| bool | prefixbound, | ||
| RunOver | runover, | ||
| bool | fieldsarealigned, | ||
| UT_WorkBuffer & | paraminitcode | ||
| ) |
Append into sign the argument signature for a binding.
| CE_API void CE_Snippet::buildKernelRunOverArguments | ( | UT_WorkBuffer & | signature, |
| RunOver | runover, | ||
| bool | singleworkgroup, | ||
| bool | filedsarealigned, | ||
| bool | prefixbound | ||
| ) |
Append into signature the arguments required for the runover mode.
| CE_API void CE_Snippet::buildKernelRunOverCode | ( | UT_WorkBuffer & | signature, |
| RunOver | runover, | ||
| BindingVDBType | firstvdbtype, | ||
| bool | singleworkgroup, | ||
| bool | fieldsarealigned, | ||
| bool | firstname_forced, | ||
| bool | prefixbound, | ||
| UT_StringRef | firstname | ||
| ) |
Append into sign the code to start the provided runover mode.
| CE_API UT_StringHolder CE_Snippet::computeSyntax | ( | const char * | code | ) |
Return a syntax string that is byte-for-byte with code describing the state at that point.
| CE_API UT_StringHolder CE_Snippet::expandImportDirectives | ( | UT_StringHolder | code, |
| UT_ErrorManager * | error | ||
| ) |
Expands all #import directives.
| CE_API UT_StringHolder CE_Snippet::extractBindings | ( | UT_StringHolder | code, |
| UT_Array< Binding > & | bindings, | ||
| RunOver & | runover, | ||
| UT_ErrorManager * | error | ||
| ) |
Process all #bind/#runover commands appending to the provided Bindings array. Returns the code with the #bind/#runover elided
| CE_API UT_StringHolder CE_Snippet::findIncludeFile | ( | const char * | path, |
| bool | searchcwd, | ||
| UT_ErrorManager * | error | ||
| ) |
Expands a path into the matching include file on the search path
| CE_API UT_StringHolder CE_Snippet::generateAtCode | ( | UT_StringHolder | code, |
| RunOver | runover, | ||
| UT_Options * | opt, | ||
| UT_StringMap< UT_StringHolder > * | globals, | ||
| UT_StringMap< UT_StringHolder > * | missing_globals, | ||
| const UT_Array< Binding > & | bindings, | ||
| const char * | kernelsig, | ||
| const char * | writebacksig, | ||
| UT_ErrorManager * | error | ||
| ) |
Returns the kernel code transformed by the bindings, ie, all @ commands turned into accessors and the appropriate prequel code generated. Globals generate := _bound_VAL
| CE_API UT_StringHolder CE_Snippet::loadImport | ( | const char * | path, |
| bool | searchcwd, | ||
| UT_ErrorManager * | error | ||
| ) |
Loads an import, searching the include path to locate it.
| CE_API bool CE_Snippet::parseType | ( | const UT_StringRef & | attribtypename, |
| BindingAttribType & | attribtype, | ||
| BindingPrecision & | precision, | ||
| int & | tuplesize | ||
| ) |
Given an opencl decorated typename break it into type, precision, and size. TYPE#[] TYPE: half, float, double, fpreal, short, int, long exint #: missing means scalar, ? means -1. [] optional to flag array.
| CE_API UT_StringHolder CE_Snippet::protectAts | ( | UT_StringHolder | code | ) |
Protect that shouldn't be parsed because they are in comments or in quotes with ATSAFESTRING
| CE_API void CE_Snippet::reportSetArgError | ( | const char * | name, |
| int | argidx, | ||
| int | pidx, | ||
| const char * | type, | ||
| const char * | extra, | ||
| UT_ErrorManager * | error | ||
| ) |
Adds an error to the error manager for mis-binding an argument.
| CE_API UT_StringHolder CE_Snippet::restoreAts | ( | UT_StringHolder | code | ) |
Restore protected to be @ again.
| CE_API const char* CE_Snippet::runoverToString | ( | RunOver | runover | ) |
|
inline |
}
Definition at line 161 of file CE_SnippetKernelBind.h.
|
inline |
Binds each of the bindings in turn. OP is a callback structure that knows how to bind the various bespoke types, with bool operator()(const CE_Snippet::Binding &binding, int p, cl::Kernel &kernel, int &argidx, UT_ErrorManager *error, CE_Precision PREC)
Definition at line 42 of file CE_SnippetKernelBind.h.