50 if (OpenMPDeviceContext::isSupported()) {
54 if (OpenCLDeviceContext::isSupported()) {
58 if (CUDADeviceContext::isSupported()) {
62 if (GLSLTransformFeedbackDeviceContext::isSupported()) {
66 if (GLSLComputeDeviceContext::isSupported()) {
75 #if defined(OPENSUBDIV_VERSION_NUMBER)
76 return OPENSUBDIV_VERSION_NUMBER;
77 #elif defined(OPENSUBDIV_VERSION_MAJOR)
78 return OPENSUBDIV_VERSION_MAJOR * 10000 + OPENSUBDIV_VERSION_MINOR * 100 +
79 OPENSUBDIV_VERSION_PATCH;
80 #elif defined(OPENSUBDIV_VERSION)
81 const char *version =
STRINGIFY(OPENSUBDIV_VERSION);
82 if (version[0] ==
'v') {
85 int major = 0, minor = 0, patch = 0;
88 if (tokens.size() == 3) {
89 major = atoi(tokens[0].c_str());
90 minor = atoi(tokens[1].c_str());
91 patch = atoi(tokens[2].c_str());
93 return major * 10000 + minor * 100 + patch;
void stringSplit(vector< string > *tokens, const string &str, const string &separators, bool skip_empty)
int openSubdiv_getVersionHex(void)
void openSubdiv_init(void)
void openSubdiv_cleanup(void)
int openSubdiv_getAvailableEvaluators(void)
@ OPENSUBDIV_EVALUATOR_CUDA
@ OPENSUBDIV_EVALUATOR_OPENMP
@ OPENSUBDIV_EVALUATOR_CPU
@ OPENSUBDIV_EVALUATOR_OPENCL
@ OPENSUBDIV_EVALUATOR_GLSL_COMPUTE
@ OPENSUBDIV_EVALUATOR_GLSL_TRANSFORM_FEEDBACK