12 #ifndef __CVEX_Context__
13 #define __CVEX_Context__
30 class VEX_ChannelCache;
37 template <VEX_Precision PREC>
52 myTimeSpecified =
true;
53 myTransform.setTime(time);
62 myTransform.setCwdId(
id);
69 myTransform.setGraphCwdId(
id);
76 myTransform.setWorldId(
id);
83 myTransform.setOpCaller(caller);
95 myTransform.setOpGraphProxy(graph);
100 {
return myTransform.opGraphProxy(); }
109 myTimeSampleEncountered =
v;
116 return myTimeSampleEncountered;
138 myGeoCommandQueue = geocmd;
142 return myGeoCommandQueue;
160 int cwdId()
const {
return myTransform.cwdId(); }
161 int worldId()
const {
return myTransform.worldId();}
180 bool myTimeSpecified;
181 bool myTimeDependent;
182 bool myTimeSampleEncountered;
183 VEX_ChannelCache *myChannelCache;
184 VEX_FileCache *myFileCache;
222 template <VEX_Precision PREC>
238 static void clearAllFunctions();
246 bool isValid()
const;
265 void *
data,
int array_size);
273 void *data,
int array_size);
304 bool preloadFile(
UT_IStream &is,
const char *name,
305 UT_String *actual_name,
bool override_old);
323 bool load(
int argc,
const char *
const argv[]);
327 bool loadFunction(
CVEX_Function function,
int argc,
const char *
const argv[]);
330 bool isLoaded()
const;
339 {
return myInputs.getValue(name, type); }
341 {
return myInputs.getValue(name, type); }
361 {
return myOutputs.getValue(name, type); }
363 {
return myOutputs.getValue(name, type); }
405 bool run(
int array_size,
bool interruptable,
421 void clearVexErrors();
427 struct cvex_BoundValue
432 , myStoragePtr(nullptr)
441 void copyBoundData(cvex_BoundValue &bound,
443 int start,
int nproc);
448 int start,
int nproc);
451 int start,
int nproc);
454 int start,
int nproc);
459 int argc,
const char *
const argv[]);
const char * getLastError() const
CVEX_ValueListT< PREC > & getInputList()
const VEX_GeoInputs * getGeoInputs() const
VEX_ChannelCache * getChannelCache()
VEX_FileCache * getFileCache()
GT_API const UT_StringHolder time
CVEX_API exint CVEXgetGlobalContextUniqueId()
bool timeSpecified() const
GLsizei const GLfloat * value
const CVEX_ValueT< PREC > * findInput(const UT_StringRef &name) const
Find an input by name.
UT_OpCaller * getOpCaller() const
Access to the OP_Caller.
void setGraphCWDNodeId(int id)
void setWorldNodeId(int id)
const exint * getProcId() const
void setGeoInputs(const VEX_GeoInputs *geo)
void setTimeDependent(bool v)
const CVEX_ValueT< PREC > * findOutput(const UT_StringRef &name, CVEX_Type type) const
Find an output by name/type.
const UT_OpGraphProxy * getOpGraphProxy() const
Access to the OP_GraphProxy.
CVEX_ValueT< PREC > * findInput(const UT_StringRef &name)
VEX_GeoCommandQueue< PREC > * getGeoCommandQueue() const
const CVEX_ValueT< PREC > * findOutput(const UT_StringRef &name) const
Find and output by name.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
List of input or output values for a CVEX_Context.
A class representing a VEX value.
GLint GLint GLsizei GLint GLenum GLenum type
void setCWDNodeId(int id)
bool isTimeDependent() const
const CVEX_ValueListT< PREC > & getInputList() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
void setTimeSampleEncountered(bool v)
Set flag indicating whether there are any time samples involved.
const CVEX_ValueT< PREC > * findInput(const UT_StringRef &name, CVEX_Type type) const
Find an input by name/type.
void setTime(fpreal time)
void setProcId(exint *procid)
GLuint const GLchar * name
GLsizei const GLchar *const * strings
CVEX_Type
The CVEX_Type enum defines the VEX types available to CVEX.
CVEX_ValueT< PREC > * findOutput(const UT_StringRef &name)
CVEX_ValueListT< PREC > & getOutputList()
CVEX_ValueT< PREC > * findOutput(const UT_StringRef &name, CVEX_Type type)
A class holding a VEX function.
void setGeoCommandQueue(VEX_GeoCommandQueue< PREC > *geocmd)
Sets the command queue for this context.
const CVEX_ValueListT< PREC > & getOutputList() const
GLenum GLsizei GLsizei GLint * values
CVEX_Transform & getTransform()
CVEX_ValueT< PREC > * findInput(const UT_StringRef &name, CVEX_Type type)
CVEX_EXTERN_TEMPLATE(CVEX_RunDataT< VEX_32 >)
void setOpGraphProxy(const UT_OpGraphProxy *graph)
Per-run data for CVEX execution.
typename VEX_PrecisionResolver< P >::int_type VEXint
bool timeDependent() const
void setOpCaller(UT_OpCaller *caller)
void clear()
Resets list to an empty list.
bool isTimeSampleEncountered() const
CVEX_API exint CVEXgetGlobalContextClearCount()