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.setWorldId(
id);
76 myTransform.setOpCaller(caller);
89 myTimeSampleEncountered =
v;
96 return myTimeSampleEncountered;
118 myGeoCommandQueue = geocmd;
122 return myGeoCommandQueue;
140 int cwdId()
const {
return myTransform.cwdId(); }
141 int worldId()
const {
return myTransform.worldId();}
160 bool myTimeSpecified;
161 bool myTimeDependent;
162 bool myTimeSampleEncountered;
163 VEX_ChannelCache *myChannelCache;
164 VEX_FileCache *myFileCache;
202 template <VEX_Precision PREC>
218 static void clearAllFunctions();
226 bool isValid()
const;
245 void *
data,
int array_size);
253 void *data,
int array_size);
284 bool preloadFile(
UT_IStream &is,
const char *name,
285 UT_String *actual_name,
bool override_old);
303 bool load(
int argc,
const char *
const argv[]);
307 bool loadFunction(
CVEX_Function function,
int argc,
const char *
const argv[]);
310 bool isLoaded()
const;
319 {
return myInputs.getValue(name, type); }
321 {
return myInputs.getValue(name, type); }
341 {
return myOutputs.getValue(name, type); }
343 {
return myOutputs.getValue(name, type); }
385 bool run(
int array_size,
bool interruptable,
401 void clearVexErrors();
407 struct cvex_BoundValue
412 , myStoragePtr(nullptr)
421 void copyBoundData(cvex_BoundValue &bound,
423 int start,
int nproc);
428 int start,
int nproc);
431 int start,
int nproc);
434 int start,
int nproc);
439 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
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 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.
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.
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 >)
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()