OWL
OptiX7 Wrapper Library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
owl_host.h
Go to the documentation of this file.
1 // ======================================================================== //
2 // Copyright 2019-2020 Ingo Wald //
3 // //
4 // Licensed under the Apache License, Version 2.0 (the "License"); //
5 // you may not use this file except in compliance with the License. //
6 // You may obtain a copy of the License at //
7 // //
8 // http://www.apache.org/licenses/LICENSE-2.0 //
9 // //
10 // Unless required by applicable law or agreed to in writing, software //
11 // distributed under the License is distributed on an "AS IS" BASIS, //
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
13 // See the License for the specific language governing permissions and //
14 // limitations under the License. //
15 // ======================================================================== //
16 
17 #pragma once
18 
19 #include <cuda.h>
20 #include <driver_types.h>
21 #include <optix.h>
22 
23 #include <sys/types.h>
24 #include <stdint.h>
25 
26 #ifdef __cplusplus
27 # include <cstddef>
28 #endif
29 
30 
31 #if defined(_MSC_VER)
32 # define OWL_DLL_EXPORT __declspec(dllexport)
33 # define OWL_DLL_IMPORT __declspec(dllimport)
34 #elif defined(__clang__) || defined(__GNUC__)
35 # define OWL_DLL_EXPORT __attribute__((visibility("default")))
36 # define OWL_DLL_IMPORT __attribute__((visibility("default")))
37 #else
38 # define OWL_DLL_EXPORT
39 # define OWL_DLL_IMPORT
40 #endif
41 
42 #ifdef __cplusplus
43 # define OWL_IF_CPP(a) a
44 #else
45 # define OWL_IF_CPP(a) /* drop it */
46 #endif
47 
48 #if defined(OWL_DLL_INTERFACE)
49 # ifdef owl_EXPORTS
50 # define OWL_API OWL_DLL_EXPORT
51 # else
52 # define OWL_API OWL_DLL_IMPORT
53 # endif
54 #else
55 # ifdef __cplusplus
56 # define OWL_API extern "C" OWL_DLL_EXPORT
57 # else
58 # define OWL_API /* bla */
59 # endif
60 //# define OWL_API /*static lib*/
61 #endif
62 //#ifdef __cplusplus
63 //# define OWL_API extern "C" OWL_DLL_EXPORT
64 //#else
65 //# define OWL_API /* bla */
66 //#endif
67 
68 
69 
70 #define OWL_OFFSETOF(type,member) \
71  ((char *)(&((struct type *)0)-> member ) \
72  - \
73  (char *)(((struct type *)0)))
74 
75 
78 typedef enum
79  {
86 
91 
97 
98 typedef enum
99  {
104  OWL_SBT_ALL = 0x7
106 
107 typedef enum
108  {
110 
116 
118 
124 
128 
129 
130  /* all types that are naively copyable should be below this value,
131  all that aren't should be above */
133 
134 
135  OWL_FLOAT=1000,
139 
140  OWL_INT=1100,
144 
145  OWL_UINT=1200,
149 
150  OWL_LONG=1300,
154 
155  OWL_ULONG=1400,
159 
164 
165  OWL_CHAR=1600,
169 
171  OWL_UCHAR=1700,
175 
183 
184 
185  /* matrix formats */
187 
192  OWL_USER_TYPE_BEGIN=10000
193  }
194  OWLDataType;
195 
196 #define OWL_USER_TYPE(userType) ((OWLDataType)(OWL_USER_TYPE_BEGIN+sizeof(userType)))
197 
198 typedef enum
199  {
200  // soon to be deprecated old naming
202  // new naming, to be consistent with type OLWGeom (not OWLGeometry):
204  // soon to be deprecated old naming
206  // new naming, to be consistent with type OLWGeom (not OWLGeometry):
210  }
211  OWLGeomKind;
212 
213 #define OWL_ALL_RAY_TYPES -1
214 
215 
216 typedef float OWL_float;
217 typedef double OWL_double;
218 typedef int32_t OWL_int;
219 typedef uint32_t OWL_uint;
220 typedef int64_t OWL_long;
221 typedef uint64_t OWL_ulong;
222 
223 typedef struct _OWL_int2 { int32_t x,y; } owl2i;
224 typedef struct _OWL_uint2 { int32_t x,y; } owl2ui;
225 typedef struct _OWL_long2 { int64_t x,y; } owl2l;
226 typedef struct _OWL_ulong2 { uint64_t x,y; } owl2ul;
227 typedef struct _OWL_float2 { float x,y; } owl2f;
228 typedef struct _OWL_double2 { double x,y; } owl2d;
229 
230 typedef struct _OWL_int3 { int32_t x,y,z; } owl3i;
231 typedef struct _OWL_uint3 { uint32_t x,y,z; } owl3ui;
232 typedef struct _OWL_long3 { int64_t x,y,z; } owl3l;
233 typedef struct _OWL_ulong3 { uint64_t x,y,z; } owl3ul;
234 typedef struct _OWL_float3 { float x,y,z; } owl3f;
235 typedef struct _OWL_double3 { double x,y,z; } owl3d;
236 
237 typedef struct _OWL_int4 { int32_t x,y,z,w; } owl4i;
238 typedef struct _OWL_uint4 { uint32_t x,y,z,w; } owl4ui;
239 typedef struct _OWL_long4 { int64_t x,y,z,w; } owl4l;
240 typedef struct _OWL_ulong4 { uint64_t x,y,z,w; } owl4ul;
241 typedef struct _OWL_float4 { float x,y,z,w; } owl4f;
242 typedef struct _OWL_double4 { double x,y,z,w; } owl4d;
243 
244 typedef struct _OWL_affine3f { owl3f vx,vy,vz,t; } owl4x3f;
245 
246 typedef struct _OWLVarDecl {
247  const char *name;
249  uint32_t offset;
251 
252 
254 typedef enum {
259 }
261 
263 typedef enum {
266 }
268 
270 typedef enum {
275 }
277 
278 
279 // ------------------------------------------------------------------
280 // device-objects - size of those _HAS_ to match the device-side
281 // definition of these types
282 // ------------------------------------------------------------------
283 typedef OptixTraversableHandle OWLDeviceTraversable;
285 
286 
287 typedef struct _OWLContext *OWLContext;
288 typedef struct _OWLBuffer *OWLBuffer;
289 typedef struct _OWLTexture *OWLTexture;
290 typedef struct _OWLGeom *OWLGeom;
291 typedef struct _OWLGeomType *OWLGeomType;
292 typedef struct _OWLVariable *OWLVariable;
293 typedef struct _OWLModule *OWLModule;
294 typedef struct _OWLGroup *OWLGroup;
295 typedef struct _OWLRayGen *OWLRayGen;
296 typedef struct _OWLMissProg *OWLMissProg;
306 typedef struct _OWLLaunchParams *OWLLaunchParams, *OWLParams, *OWLGlobals;
307 
312 
314 OWL_API int32_t
316 
333 owlContextCreate(int32_t *requestedDeviceIDs OWL_IF_CPP(=nullptr),
334  int numDevices OWL_IF_CPP(=0));
335 
340 OWL_API void
342 
346 OWL_API void
348  size_t numRayTypes);
349 
372 OWL_API void
374  int32_t maxInstanceDepth);
375 
376 
377 OWL_API void
379 
380 /* return the cuda stream associated with the given device. */
381 OWL_API CUstream
382 owlContextGetStream(OWLContext context, int deviceID);
383 
384 /* return the optix context associated with the given device. */
385 OWL_API OptixDeviceContext
386 owlContextGetOptixContext(OWLContext context, int deviceID);
387 
390  const char *ptxCode);
391 
394  OWLGeomType type);
395 
398  size_t sizeOfVarStruct,
399  OWLVarDecl *vars,
400  int numVars);
401 
404  OWLModule module,
405  const char *programName,
406  size_t sizeOfVarStruct,
407  OWLVarDecl *vars,
408  int numVars);
409 
419  OWLModule module,
420  const char *programName,
421  size_t sizeOfVarStruct,
422  OWLVarDecl *vars,
423  int numVars);
424 
426 OWL_API void
428  int rayType,
429  OWLMissProg missProgToUse);
430 
431 // ------------------------------------------------------------------
445  size_t numGeometries,
446  OWLGeom *arrayOfChildGeoms);
447 
448 
449 // ------------------------------------------------------------------
463  size_t numGeometries,
464  OWLGeom *initValues);
465 
466 // ------------------------------------------------------------------
482 
484  size_t numInstances,
485 
492  const OWLGroup *initGroups OWL_IF_CPP(= nullptr),
493 
504  const uint32_t *initInstanceIDs OWL_IF_CPP(= nullptr),
505 
510  const float *initTransforms OWL_IF_CPP(= nullptr),
512  );
513 
514 
515 
518 
521  OWLGeomKind kind,
522  size_t sizeOfVarStruct,
523  OWLVarDecl *vars,
524  int numVars);
525 
526 
533  OWLTexelFormat texelFormat,
535  uint32_t size_x,
537  uint32_t size_y,
538  const void *texels,
543  uint32_t linePitchInBytes OWL_IF_CPP(=0)
544  );
545 
548 OWL_API CUtexObject
549 owlTextureGetObject(OWLTexture texture, int deviceID);
550 
552 OWL_API void
554 
559  OWLDataType type,
560  size_t count,
561  const void *init);
562 
568  OWLDataType type,
569  size_t count);
570 
576  OWLDataType type,
577  size_t count,
578  const void *init);
579 
584  OWLDataType type,
585  size_t count,
586  cudaGraphicsResource_t resource);
587 
588 OWL_API void
590 
591 OWL_API void
593 
602 OWL_API const void *
603 owlBufferGetPointer(OWLBuffer buffer, int deviceID);
604 
605 OWL_API OptixTraversableHandle
606 owlGroupGetTraversable(OWLGroup group, int deviceID);
607 
608 OWL_API void
609 owlBufferResize(OWLBuffer buffer, size_t newItemCount);
610 
615 OWL_API void
617 
618 OWL_API void
619 owlBufferUpload(OWLBuffer buffer, const void *hostPtr);
620 
624 OWL_API void
625 owlRayGenLaunch2D(OWLRayGen rayGen, int dims_x, int dims_y);
626 
629 OWL_API void
630 owlLaunch2D(OWLRayGen rayGen, int dims_x, int dims_y,
631  OWLParams params);
632 
636 OWL_API void
637 owlAsyncLaunch2D(OWLRayGen rayGen, int dims_x, int dims_y,
638  OWLParams params);
639 
640 
641 OWL_API CUstream
642 owlParamsGetCudaStream(OWLParams params, int deviceID);
643 
645 OWL_API void
647 
648 // ==================================================================
649 // "Triangles" functions
650 // ==================================================================
652  OWLBuffer vertices,
653  size_t count,
654  size_t stride,
655  size_t offset);
664  size_t numKeys,
665  OWLBuffer *vertexArrays,
666  size_t count,
667  size_t stride,
668  size_t offset);
670  OWLBuffer indices,
671  size_t count,
672  size_t stride,
673  size_t offset);
674 
675 // -------------------------------------------------------
676 // group/hierarchy creation and setting
677 // -------------------------------------------------------
678 OWL_API void
680  int whichChild,
681  OWLGroup child);
682 
685 OWL_API void
687  int whichChild,
688  const float *floats,
690 
694 OWL_API void
698  uint32_t timeStep,
699  const float *floatsForThisStimeStep,
701 
707 OWL_API void
709  const uint32_t *instanceIDs);
710 
711 OWL_API void
713  int rayType,
714  OWLModule module,
715  const char *progName);
716 
717 OWL_API void
719  int rayType,
720  OWLModule module,
721  const char *progName);
722 
723 OWL_API void
725  int rayType,
726  OWLModule module,
727  const char *progName);
728 
729 OWL_API void
731  OWLModule module,
732  const char *progName);
733 
736 OWL_API void
738  size_t primCount);
739 
740 
741 // -------------------------------------------------------
742 // Release for the various types
743 // -------------------------------------------------------
750 
751 // -------------------------------------------------------
752 // VariableGet for the various types
753 // -------------------------------------------------------
756  const char *varName);
757 
760  const char *varName);
761 
764  const char *varName);
765 
768  const char *varName);
769 
770 // -------------------------------------------------------
771 // VariableSet for different variable types
772 // -------------------------------------------------------
773 
777 OWL_API void owlVariableSetRaw(OWLVariable variable, const void *valuePtr);
778 OWL_API void owlVariableSetPointer(OWLVariable variable, const void *valuePtr);
779 #define _OWL_SET_HELPER(stype,abb) \
780  OWL_API void owlVariableSet1##abb(OWLVariable var, \
781  stype v); \
782  OWL_API void owlVariableSet2##abb(OWLVariable var, \
783  stype x, \
784  stype y); \
785  OWL_API void owlVariableSet3##abb(OWLVariable var, \
786  stype x, \
787  stype y, \
788  stype z); \
789  /*end of macro */
790 _OWL_SET_HELPER(int32_t,i)
791 _OWL_SET_HELPER(uint32_t,ui)
792 _OWL_SET_HELPER(int64_t,l)
793 _OWL_SET_HELPER(uint64_t,ul)
794 _OWL_SET_HELPER(float,f)
795 _OWL_SET_HELPER(double,d)
796 #undef _OWL_SET_HELPER
797 
798 
799 
800 
801 
802 // -------------------------------------------------------
803 // VariableSet for different *object* types
804 // -------------------------------------------------------
805 
806 #define _OWL_SET_HELPERS_C(OType,stype,abb) \
807  /* set1 */ \
808  inline void owl##OType##Set1##abb(OWL##OType object, \
809  const char *varName, \
810  stype v) \
811  { \
812  OWLVariable var \
813  = owl##OType##GetVariable(object,varName); \
814  owlVariableSet1##abb(var,v); \
815  owlVariableRelease(var); \
816  } \
817  /* set2 */ \
818  inline void owl##OType##Set2##abb(OWL##OType object, \
819  const char *varName, \
820  stype x, \
821  stype y) \
822  { \
823  OWLVariable var \
824  = owl##OType##GetVariable(object,varName); \
825  owlVariableSet2##abb(var,x,y); \
826  owlVariableRelease(var); \
827  } \
828  /* set3 */ \
829  inline void owl##OType##Set3##abb(OWL##OType object, \
830  const char *varName, \
831  stype x, \
832  stype y, \
833  stype z) \
834  { \
835  OWLVariable var \
836  = owl##OType##GetVariable(object,varName); \
837  owlVariableSet3##abb(var,x,y,z); \
838  owlVariableRelease(var); \
839  } \
840  /* end of macro */
841 
842 
843 #ifdef __cplusplus
844 #define _OWL_SET_HELPERS_CPP(OType,stype,abb) \
845  inline void owl##OType##Set2##abb(OWL##OType object, \
846  const char *varName, \
847  const owl2##abb &v) \
848  { \
849  OWLVariable var \
850  = owl##OType##GetVariable(object,varName); \
851  owlVariableSet2##abb(var,v.x,v.y); \
852  owlVariableRelease(var); \
853  } \
854  inline void owl##OType##Set3##abb(OWL##OType object, \
855  const char *varName, \
856  const owl3##abb &v) \
857  { \
858  OWLVariable var \
859  = owl##OType##GetVariable(object,varName); \
860  owlVariableSet3##abb(var,v.x,v.y,v.z); \
861  owlVariableRelease(var); \
862  } \
863  /* end of macro */
864 #else
865 #define _OWL_SET_HELPERS_CPP(OType,stype,abb) /* ignore in C99 mode */
866 #endif
867 
868 #define _OWL_SET_HELPERS(Type) \
869  /* texture, buffer, other */ \
870  inline void owl##Type##SetTexture(OWL##Type object, \
871  const char *varName, \
872  OWLTexture v) \
873  { \
874  OWLVariable var \
875  = owl##Type##GetVariable(object,varName); \
876  owlVariableSetTexture(var,v); \
877  owlVariableRelease(var); \
878  } \
879  /* group, buffer, other */ \
880  inline void owl##Type##SetGroup(OWL##Type object, \
881  const char *varName, \
882  OWLGroup v) \
883  { \
884  OWLVariable var \
885  = owl##Type##GetVariable(object,varName); \
886  owlVariableSetGroup(var,v); \
887  owlVariableRelease(var); \
888  } \
889  inline void owl##Type##SetRaw(OWL##Type object, \
890  const char *varName, \
891  const void *v) \
892  { \
893  OWLVariable var \
894  = owl##Type##GetVariable(object,varName); \
895  owlVariableSetRaw(var,v); \
896  owlVariableRelease(var); \
897  } \
898  inline void owl##Type##SetPointer(OWL##Type object, \
899  const char *varName, \
900  const void *v) \
901  { \
902  OWLVariable var \
903  = owl##Type##GetVariable(object,varName); \
904  owlVariableSetPointer(var,v); \
905  owlVariableRelease(var); \
906  } \
907  inline void owl##Type##SetBuffer(OWL##Type object, \
908  const char *varName, \
909  OWLBuffer v) \
910  { \
911  OWLVariable var \
912  = owl##Type##GetVariable(object,varName); \
913  owlVariableSetBuffer(var,v); \
914  owlVariableRelease(var); \
915  } \
916  \
917  _OWL_SET_HELPERS_C(Type,int32_t,i) \
918  _OWL_SET_HELPERS_C(Type,uint32_t,ui) \
919  _OWL_SET_HELPERS_C(Type,int64_t,l) \
920  _OWL_SET_HELPERS_C(Type,uint64_t,ul) \
921  _OWL_SET_HELPERS_C(Type,float,f) \
922  _OWL_SET_HELPERS_C(Type,double,d) \
923  _OWL_SET_HELPERS_CPP(Type,int32_t,i) \
924  _OWL_SET_HELPERS_CPP(Type,uint32_t,ui) \
925  _OWL_SET_HELPERS_CPP(Type,int64_t,l) \
926  _OWL_SET_HELPERS_CPP(Type,uint64_t,ul) \
927  _OWL_SET_HELPERS_CPP(Type,float,f) \
928  _OWL_SET_HELPERS_CPP(Type,double,d) \
929  /* end of macro */
930 
931  _OWL_SET_HELPERS(RayGen)
932  _OWL_SET_HELPERS(Geom)
933  _OWL_SET_HELPERS(Params)
934  _OWL_SET_HELPERS(MissProg)
935 
936 #undef _OWL_SET_HELPERS_CPP
937 #undef _OWL_SET_HELPERS_C
938 #undef _OWL_SET_HELPERS
939 
940 
941 #ifdef __cplusplus
942 
944  inline void
946  int childID,
947  const owl4x3f &xfm)
948  {
949  owlInstanceGroupSetTransform(group,childID,(const float *)&xfm,
951  }
954 inline void
956  int childID,
957  const owl4x3f *xfm)
958 {
959  owlInstanceGroupSetTransform(group,childID,(const float *)xfm,
961 }
962 
963 #endif
964 
965 
966 
967 
968 
969 
970 
971 
972 
973 
owlRayGenLaunch2D
OWL_API void owlRayGenLaunch2D(OWLRayGen rayGen, int dims_x, int dims_y)
_OWL_double4::y
double y
Definition: owl_host.h:242
_OWL_int2::x
int32_t x
Definition: owl_host.h:223
OWL_TEXEL_FORMAT_RGBA32F
@ OWL_TEXEL_FORMAT_RGBA32F
Definition: owl_host.h:256
OWL_UCHAR3
@ OWL_UCHAR3
Definition: owl_host.h:173
optix.h
OWLVarDecl
struct _OWLVarDecl OWLVarDecl
_OWL_double3::y
double y
Definition: owl_host.h:235
OWL_ULONG
@ OWL_ULONG
Definition: owl_host.h:155
owlTrianglesSetMotionVertices
OWL_API void owlTrianglesSetMotionVertices(OWLGeom triangles, size_t numKeys, OWLBuffer *vertexArrays, size_t count, size_t stride, size_t offset)
_OWL_SET_HELPERS
#define _OWL_SET_HELPERS(Type)
Definition: owl_host.h:868
_OWL_float2::x
float x
Definition: owl_host.h:227
OWL_LONG3
@ OWL_LONG3
Definition: owl_host.h:152
owlBufferGetPointer
OWL_API const void * owlBufferGetPointer(OWLBuffer buffer, int deviceID)
_OWL_float4::z
float z
Definition: owl_host.h:241
owlInstanceGroupSetTransform
OWL_API void owlInstanceGroupSetTransform(OWLGroup group, int whichChild, const float *floats, OWLMatrixFormat matrixFormat OWL_IF_CPP(=OWL_MATRIX_FORMAT_OWL))
_OWL_double4
Definition: owl_host.h:242
owlParamsGetVariable
OWL_API OWLVariable owlParamsGetVariable(OWLParams object, const char *varName)
OWL_CHAR3
@ OWL_CHAR3
Definition: owl_host.h:167
OWL_FLOAT3
@ OWL_FLOAT3
Definition: owl_host.h:137
OWL_DOUBLE
@ OWL_DOUBLE
Definition: owl_host.h:160
OWLParams
struct _OWLLaunchParams * OWLParams
Definition: owl_host.h:306
_OWL_float4
Definition: owl_host.h:241
OWLGeomType
struct _OWLGeomType * OWLGeomType
Definition: owl_host.h:291
owlGraphicsBufferMap
OWL_API void owlGraphicsBufferMap(OWLBuffer buffer)
owlMissProgGetVariable
OWL_API OWLVariable owlMissProgGetVariable(OWLMissProg geom, const char *varName)
_OWL_double2::x
double x
Definition: owl_host.h:228
owlRayGenGetVariable
OWL_API OWLVariable owlRayGenGetVariable(OWLRayGen geom, const char *varName)
OWLBuildSBTFlags
OWLBuildSBTFlags
Definition: owl_host.h:99
owl3ul
struct _OWL_ulong3 owl3ul
_OWL_long4::x
int64_t x
Definition: owl_host.h:239
_OWL_int4::w
int32_t w
Definition: owl_host.h:237
owlVariableRelease
OWL_API void owlVariableRelease(OWLVariable variable)
_OWL_uint3::x
uint32_t x
Definition: owl_host.h:231
_OWL_long4::z
int64_t z
Definition: owl_host.h:239
OWL_SBT_ALL
@ OWL_SBT_ALL
Definition: owl_host.h:104
OWL_TRIANGLES
@ OWL_TRIANGLES
Definition: owl_host.h:208
owlBuildPrograms
OWL_API void owlBuildPrograms(OWLContext context)
owlTextureGetObject
OWL_API CUtexObject owlTextureGetObject(OWLTexture texture, int deviceID)
OWL_IF_CPP
#define OWL_IF_CPP(a)
Definition: owl_host.h:45
owlManagedMemoryBufferCreate
OWL_API OWLBuffer owlManagedMemoryBufferCreate(OWLContext context, OWLDataType type, size_t count, const void *init)
OWL_DOUBLE2
@ OWL_DOUBLE2
Definition: owl_host.h:161
_OWL_int4
Definition: owl_host.h:237
OWL_DOUBLE4
@ OWL_DOUBLE4
Definition: owl_host.h:163
OWL_TEXEL_FORMAT_R8
@ OWL_TEXEL_FORMAT_R8
Definition: owl_host.h:257
OWL_MATRIX_FORMAT_OWL
@ OWL_MATRIX_FORMAT_OWL
Definition: owl_host.h:90
OWLGeom
struct _OWLGeom * OWLGeom
Definition: owl_host.h:290
OWL_CHAR2
@ OWL_CHAR2
Definition: owl_host.h:166
owlInstanceGroupSetChild
OWL_API void owlInstanceGroupSetChild(OWLGroup group, int whichChild, OWLGroup child)
_OWL_long3::y
int64_t y
Definition: owl_host.h:232
owlGeomTypeSetIntersectProg
OWL_API void owlGeomTypeSetIntersectProg(OWLGeomType type, int rayType, OWLModule module, const char *progName)
OWL_MATRIX_FORMAT_ROW_MAJOR
@ OWL_MATRIX_FORMAT_ROW_MAJOR
Definition: owl_host.h:95
OWL_INT
@ OWL_INT
Definition: owl_host.h:140
OWL_ULONG2
@ OWL_ULONG2
Definition: owl_host.h:156
owlParamsGetCudaStream
OWL_API CUstream owlParamsGetCudaStream(OWLParams params, int deviceID)
OWL_UCHAR4
@ OWL_UCHAR4
Definition: owl_host.h:174
_OWL_uint2::y
int32_t y
Definition: owl_host.h:224
OWL_TEXTURE_CLAMP
@ OWL_TEXTURE_CLAMP
Definition: owl_host.h:272
OWL_CHAR
@ OWL_CHAR
Definition: owl_host.h:165
owlGroupRefitAccel
OWL_API void owlGroupRefitAccel(OWLGroup group)
owlGeomTypeCreate
OWL_API OWLGeomType owlGeomTypeCreate(OWLContext context, OWLGeomKind kind, size_t sizeOfVarStruct, OWLVarDecl *vars, int numVars)
_OWL_long3::x
int64_t x
Definition: owl_host.h:232
OWL_GEOM_USER
@ OWL_GEOM_USER
Definition: owl_host.h:203
owl2ui
struct _OWL_uint2 owl2ui
owlGraphicsBufferCreate
OWL_API OWLBuffer owlGraphicsBufferCreate(OWLContext context, OWLDataType type, size_t count, cudaGraphicsResource_t resource)
owlGeomSetPrimCount
OWL_API void owlGeomSetPrimCount(OWLGeom geom, size_t primCount)
_OWL_float2
Definition: owl_host.h:227
OWL_DOUBLE3
@ OWL_DOUBLE3
Definition: owl_host.h:162
OWL_TEXTURE_BORDER
@ OWL_TEXTURE_BORDER
Definition: owl_host.h:273
owlTrianglesSetVertices
OWL_API void owlTrianglesSetVertices(OWLGeom triangles, OWLBuffer vertices, size_t count, size_t stride, size_t offset)
_OWL_long4::w
int64_t w
Definition: owl_host.h:239
_OWL_ulong2::y
uint64_t y
Definition: owl_host.h:226
owl4ui
struct _OWL_uint4 owl4ui
_OWL_uint4::z
uint32_t z
Definition: owl_host.h:238
OWL_INT4
@ OWL_INT4
Definition: owl_host.h:143
OWLGroup
struct _OWLGroup * OWLGroup
Definition: owl_host.h:294
owlContextSetRayTypeCount
OWL_API void owlContextSetRayTypeCount(OWLContext context, size_t numRayTypes)
_OWL_double3
Definition: owl_host.h:235
OWL_FLOAT4
@ OWL_FLOAT4
Definition: owl_host.h:138
OWL_RAW_POINTER
@ OWL_RAW_POINTER
Definition: owl_host.h:182
OWL_TEXEL_FORMAT_R32F
@ OWL_TEXEL_FORMAT_R32F
Definition: owl_host.h:258
OWL_INT3
@ OWL_INT3
Definition: owl_host.h:142
OWL_FLOAT2
@ OWL_FLOAT2
Definition: owl_host.h:136
OWLTexture
struct _OWLTexture * OWLTexture
Definition: owl_host.h:289
OWL_UINT4
@ OWL_UINT4
Definition: owl_host.h:148
owlDeviceBufferCreate
OWL_API OWLBuffer owlDeviceBufferCreate(OWLContext context, OWLDataType type, size_t count, const void *init)
OWL_GEOMETRY_USER
@ OWL_GEOMETRY_USER
Definition: owl_host.h:201
cuda.h
_OWL_float3::y
float y
Definition: owl_host.h:234
owlVariableSetPointer
OWL_API void owlVariableSetPointer(OWLVariable variable, const void *valuePtr)
OWLMissProg
struct _OWLMissProg * OWLMissProg
Definition: owl_host.h:296
owlModuleRelease
OWL_API void owlModuleRelease(OWLModule module)
owl4l
struct _OWL_long4 owl4l
owlModuleCreate
OWL_API OWLModule owlModuleCreate(OWLContext context, const char *ptxCode)
_OWL_uint4::y
uint32_t y
Definition: owl_host.h:238
_OWL_ulong4::x
uint64_t x
Definition: owl_host.h:240
owlHostPinnedBufferCreate
OWL_API OWLBuffer owlHostPinnedBufferCreate(OWLContext context, OWLDataType type, size_t count)
OWLModule
struct _OWLModule * OWLModule
Definition: owl_host.h:293
owlGeomGetVariable
OWL_API OWLVariable owlGeomGetVariable(OWLGeom geom, const char *varName)
OWL_UINT
@ OWL_UINT
Definition: owl_host.h:145
_OWLVarDecl::name
const char * name
Definition: owl_host.h:247
_OWL_affine3f::vy
owl3f vy
Definition: owl_host.h:244
OWL_GEOMETRY_TRIANGLES
@ OWL_GEOMETRY_TRIANGLES
Definition: owl_host.h:205
_OWL_double2
Definition: owl_host.h:228
owlTexture2DDestroy
OWL_API void owlTexture2DDestroy(OWLTexture texture)
_OWL_double4::x
double x
Definition: owl_host.h:242
owlSetMaxInstancingDepth
OWL_API void owlSetMaxInstancingDepth(OWLContext context, int32_t maxInstanceDepth)
_OWL_int3
Definition: owl_host.h:230
_OWL_affine3f::t
owl3f t
Definition: owl_host.h:244
_OWL_ulong3::x
uint64_t x
Definition: owl_host.h:233
owlLaunch2D
OWL_API void owlLaunch2D(OWLRayGen rayGen, int dims_x, int dims_y, OWLParams params)
OWL_MATRIX_FORMAT_COLUMN_MAJOR
@ OWL_MATRIX_FORMAT_COLUMN_MAJOR
Definition: owl_host.h:85
_OWL_float4::y
float y
Definition: owl_host.h:241
_OWL_affine3f::vx
owl3f vx
Definition: owl_host.h:244
owlContextDestroy
OWL_API void owlContextDestroy(OWLContext context)
_OWL_double4::z
double z
Definition: owl_host.h:242
OWL_LONG2
@ OWL_LONG2
Definition: owl_host.h:151
_OWL_uint4::x
uint32_t x
Definition: owl_host.h:238
owl4ul
struct _OWL_ulong4 owl4ul
owlBufferResize
OWL_API void owlBufferResize(OWLBuffer buffer, size_t newItemCount)
OWL_API
#define OWL_API
Definition: owl_host.h:58
_OWL_int2
Definition: owl_host.h:223
owlBufferUpload
OWL_API void owlBufferUpload(OWLBuffer buffer, const void *hostPtr)
_OWL_SET_HELPER
#define _OWL_SET_HELPER(stype, abb)
Definition: owl_host.h:779
OWL_GEOM_TRIANGLES
@ OWL_GEOM_TRIANGLES
Definition: owl_host.h:207
owlGeomRelease
OWL_API void owlGeomRelease(OWLGeom geometry)
_OWL_uint4::w
uint32_t w
Definition: owl_host.h:238
_OWL_ulong3::y
uint64_t y
Definition: owl_host.h:233
_OWL_uint3::z
uint32_t z
Definition: owl_host.h:231
owlMissProgSet
OWL_API void owlMissProgSet(OWLContext context, int rayType, OWLMissProg missProgToUse)
OWL_SBT_MISSPROGS
@ OWL_SBT_MISSPROGS
Definition: owl_host.h:103
_OWL_long2::y
int64_t y
Definition: owl_host.h:225
_OWL_float2::y
float y
Definition: owl_host.h:227
OWL_GROUP
@ OWL_GROUP
Definition: owl_host.h:117
owlBufferRelease
OWL_API void owlBufferRelease(OWLBuffer buffer)
owl2i
struct _OWL_int2 owl2i
owlParamsCreate
OWL_API OWLParams owlParamsCreate(OWLContext context, size_t sizeOfVarStruct, OWLVarDecl *vars, int numVars)
OWL_SBT_HITGROUPS
@ OWL_SBT_HITGROUPS
Definition: owl_host.h:100
_OWL_float3::x
float x
Definition: owl_host.h:234
OWLDeviceBuffer2D
struct _OWLDeviceBuffer2D OWLDeviceBuffer2D
owlGroupGetTraversable
OWL_API OptixTraversableHandle owlGroupGetTraversable(OWLGroup group, int deviceID)
_OWL_int3::y
int32_t y
Definition: owl_host.h:230
_OWL_uint3
Definition: owl_host.h:231
OWL_BUFFER
@ OWL_BUFFER
Definition: owl_host.h:111
owlGroupRelease
OWL_API void owlGroupRelease(OWLGroup group)
OWL_TEXTURE
@ OWL_TEXTURE
Definition: owl_host.h:126
_OWL_long3
Definition: owl_host.h:232
owlVariableSetRaw
OWL_API void owlVariableSetRaw(OWLVariable variable, const void *valuePtr)
owl2f
struct _OWL_float2 owl2f
owlEnableMotionBlur
OWL_API void owlEnableMotionBlur(OWLContext _context)
_OWL_ulong4::w
uint64_t w
Definition: owl_host.h:240
_OWL_int4::z
int32_t z
Definition: owl_host.h:237
OWLGeomKind
OWLGeomKind
Definition: owl_host.h:199
_OWL_int3::x
int32_t x
Definition: owl_host.h:230
OWLTextureFilterMode
OWLTextureFilterMode
Definition: owl_host.h:263
owlContextGetOptixContext
OWL_API OptixDeviceContext owlContextGetOptixContext(OWLContext context, int deviceID)
_OWL_uint2
Definition: owl_host.h:224
_OWL_ulong4
Definition: owl_host.h:240
owlMissProgCreate
OWL_API OWLMissProg owlMissProgCreate(OWLContext context, OWLModule module, const char *programName, size_t sizeOfVarStruct, OWLVarDecl *vars, int numVars)
owlUserGeomGroupCreate
OWL_API OWLGroup owlUserGeomGroupCreate(OWLContext context, size_t numGeometries, OWLGeom *arrayOfChildGeoms)
owlLaunchSync
OWL_API void owlLaunchSync(OWLParams params)
_OWL_long2
Definition: owl_host.h:225
OWL_LONG4
@ OWL_LONG4
Definition: owl_host.h:153
owlBuildPipeline
OWL_API void owlBuildPipeline(OWLContext context)
_OWL_float3::z
float z
Definition: owl_host.h:234
_OWL_ulong2
Definition: owl_host.h:226
owlBuildSBT
OWL_API void owlBuildSBT(OWLContext context, OWLBuildSBTFlags flags OWL_IF_CPP(=OWL_SBT_ALL))
OWLContext
struct _OWLContext * OWLContext
Definition: owl_host.h:287
_OWLDeviceBuffer2D::dims
owl2i dims
Definition: owl_host.h:284
owl3d
struct _OWL_double3 owl3d
_OWL_ulong3::z
uint64_t z
Definition: owl_host.h:233
owlGeomTypeSetAnyHit
OWL_API void owlGeomTypeSetAnyHit(OWLGeomType type, int rayType, OWLModule module, const char *progName)
owl4x3f
struct _OWL_affine3f owl4x3f
OWL_TEXTURE_LINEAR
@ OWL_TEXTURE_LINEAR
Definition: owl_host.h:265
OWLRayGen
struct _OWLRayGen * OWLRayGen
Definition: owl_host.h:295
OWL_CHAR4
@ OWL_CHAR4
Definition: owl_host.h:168
OWL_GEOMETRY_HAIR
@ OWL_GEOMETRY_HAIR
Definition: owl_host.h:209
owlTexture2DCreate
OWL_API OWLTexture owlTexture2DCreate(OWLContext context, OWLTexelFormat texelFormat, uint32_t size_x, uint32_t size_y, const void *texels, OWLTextureFilterMode filterMode OWL_IF_CPP(=OWL_TEXTURE_LINEAR), OWLTextureAddressMode addressMode OWL_IF_CPP(=OWL_TEXTURE_CLAMP), uint32_t linePitchInBytes OWL_IF_CPP(=0))
OWL_USER_TYPE_BEGIN
@ OWL_USER_TYPE_BEGIN
Definition: owl_host.h:192
_OWLDeviceBuffer2D::d_pointer
void * d_pointer
Definition: owl_host.h:284
owlVariableSetBuffer
OWL_API void owlVariableSetBuffer(OWLVariable variable, OWLBuffer value)
OWLGlobals
struct _OWLLaunchParams * OWLGlobals
Definition: owl_host.h:306
OWLTextureAddressMode
OWLTextureAddressMode
Definition: owl_host.h:270
owlGraphicsBufferUnmap
OWL_API void owlGraphicsBufferUnmap(OWLBuffer buffer)
OWL_TEXTURE_MIRROR
@ OWL_TEXTURE_MIRROR
Definition: owl_host.h:274
owlInstanceGroupCreate
OWL_API OWLGroup owlInstanceGroupCreate(OWLContext context, size_t numInstances, const OWLGroup *initGroups OWL_IF_CPP(=nullptr), const uint32_t *initInstanceIDs OWL_IF_CPP(=nullptr), const float *initTransforms OWL_IF_CPP(=nullptr), OWLMatrixFormat matrixFormat OWL_IF_CPP(=OWL_MATRIX_FORMAT_OWL))
owl3ui
struct _OWL_uint3 owl3ui
OWLMatrixFormat
OWLMatrixFormat
Definition: owl_host.h:79
OWL_long
int64_t OWL_long
Definition: owl_host.h:220
owlGroupBuildAccel
OWL_API void owlGroupBuildAccel(OWLGroup group)
_OWL_long2::x
int64_t x
Definition: owl_host.h:225
OWL_DEVICE
@ OWL_DEVICE
Definition: owl_host.h:123
owlContextCreate
OWL_API OWLContext owlContextCreate(int32_t *requestedDeviceIDs OWL_IF_CPP(=nullptr), int numDevices OWL_IF_CPP(=0))
OWL_UCHAR2
@ OWL_UCHAR2
Definition: owl_host.h:172
OWL_FLOAT
@ OWL_FLOAT
Definition: owl_host.h:135
owlVariableSetGroup
OWL_API void owlVariableSetGroup(OWLVariable variable, OWLGroup value)
OWL_ULONG3
@ OWL_ULONG3
Definition: owl_host.h:157
_OWL_BEGIN_COPYABLE_TYPES
@ _OWL_BEGIN_COPYABLE_TYPES
Definition: owl_host.h:132
owlGetDeviceCount
OWL_API int32_t owlGetDeviceCount(OWLContext context)
owl4f
struct _OWL_float4 owl4f
_OWL_uint4
Definition: owl_host.h:238
_OWL_ulong4::y
uint64_t y
Definition: owl_host.h:240
OWLDeviceTraversable
OptixTraversableHandle OWLDeviceTraversable
Definition: owl_host.h:283
OWL_ULONG4
@ OWL_ULONG4
Definition: owl_host.h:158
owlContextGetStream
OWL_API CUstream owlContextGetStream(OWLContext context, int deviceID)
OWL_TEXTURE_WRAP
@ OWL_TEXTURE_WRAP
Definition: owl_host.h:271
owlGeomTypeSetClosestHit
OWL_API void owlGeomTypeSetClosestHit(OWLGeomType type, int rayType, OWLModule module, const char *progName)
_OWL_long4
Definition: owl_host.h:239
_OWL_long4::y
int64_t y
Definition: owl_host.h:239
_OWLVarDecl
Definition: owl_host.h:246
_OWL_uint2::x
int32_t x
Definition: owl_host.h:224
OWL_BUFPTR
@ OWL_BUFPTR
Definition: owl_host.h:115
OWL_TEXEL_FORMAT_RGBA8
@ OWL_TEXEL_FORMAT_RGBA8
Definition: owl_host.h:255
owlGeomTypeSetBoundsProg
OWL_API void owlGeomTypeSetBoundsProg(OWLGeomType type, OWLModule module, const char *progName)
owl3i
struct _OWL_int3 owl3i
OWL_UCHAR
@ OWL_UCHAR
Definition: owl_host.h:171
_OWL_double2::y
double y
Definition: owl_host.h:228
owlTrianglesSetIndices
OWL_API void owlTrianglesSetIndices(OWLGeom triangles, OWLBuffer indices, size_t count, size_t stride, size_t offset)
_OWL_ulong3
Definition: owl_host.h:233
_OWL_float4::w
float w
Definition: owl_host.h:241
OWLVariable
struct _OWLVariable * OWLVariable
Definition: owl_host.h:292
OWL_BUFFER_POINTER
@ OWL_BUFFER_POINTER
Definition: owl_host.h:114
_OWL_ulong2::x
uint64_t x
Definition: owl_host.h:226
owlInstanceGroupSetInstanceIDs
OWL_API void owlInstanceGroupSetInstanceIDs(OWLGroup group, const uint32_t *instanceIDs)
owl2l
struct _OWL_long2 owl2l
_OWL_double4::w
double w
Definition: owl_host.h:242
owlRayGenRelease
OWL_API void owlRayGenRelease(OWLRayGen rayGen)
_OWL_affine3f
Definition: owl_host.h:244
_OWLDeviceBuffer2D
Definition: owl_host.h:284
OWL_TEXTURE_2D
@ OWL_TEXTURE_2D
Definition: owl_host.h:127
owl4d
struct _OWL_double4 owl4d
_OWL_double3::z
double z
Definition: owl_host.h:235
owl2d
struct _OWL_double2 owl2d
OWL_SBT_RAYGENS
@ OWL_SBT_RAYGENS
Definition: owl_host.h:102
owlVariableSetTexture
OWL_API void owlVariableSetTexture(OWLVariable variable, OWLTexture value)
OWLDataType
OWLDataType
Definition: owl_host.h:108
OWL_LONG
@ OWL_LONG
Definition: owl_host.h:150
owl3f
struct _OWL_float3 owl3f
_OWL_float3
Definition: owl_host.h:234
OWLBuffer
struct _OWLBuffer * OWLBuffer
Definition: owl_host.h:288
OWL_int
int32_t OWL_int
Definition: owl_host.h:218
OWL_UINT3
@ OWL_UINT3
Definition: owl_host.h:147
OWL_TEXTURE_NEAREST
@ OWL_TEXTURE_NEAREST
Definition: owl_host.h:264
owlAsyncLaunch2D
OWL_API void owlAsyncLaunch2D(OWLRayGen rayGen, int dims_x, int dims_y, OWLParams params)
OWL_UINT2
@ OWL_UINT2
Definition: owl_host.h:146
_OWL_int4::y
int32_t y
Definition: owl_host.h:237
OWL_INT2
@ OWL_INT2
Definition: owl_host.h:141
owl2ul
struct _OWL_ulong2 owl2ul
_OWL_float4::x
float x
Definition: owl_host.h:241
OWL_AFFINE3F
@ OWL_AFFINE3F
Definition: owl_host.h:186
_OWLVarDecl::offset
uint32_t offset
Definition: owl_host.h:249
owlRayGenCreate
OWL_API OWLRayGen owlRayGenCreate(OWLContext context, OWLModule module, const char *programName, size_t sizeOfVarStruct, OWLVarDecl *vars, int numVars)
owlGeomCreate
OWL_API OWLGeom owlGeomCreate(OWLContext context, OWLGeomType type)
owlInstanceGroupSetTransforms
OWL_API void owlInstanceGroupSetTransforms(OWLGroup group, uint32_t timeStep, const float *floatsForThisStimeStep, OWLMatrixFormat matrixFormat OWL_IF_CPP(=OWL_MATRIX_FORMAT_OWL))
OWLTexelFormat
OWLTexelFormat
Definition: owl_host.h:254
_OWL_int4::x
int32_t x
Definition: owl_host.h:237
OWL_double
double OWL_double
Definition: owl_host.h:217
OWL_SBT_GEOMS
@ OWL_SBT_GEOMS
Definition: owl_host.h:101
OWL_ulong
uint64_t OWL_ulong
Definition: owl_host.h:221
_OWL_long3::z
int64_t z
Definition: owl_host.h:232
OWL_BUFFER_ID
@ OWL_BUFFER_ID
Definition: owl_host.h:113
OWLLaunchParams
struct _OWLLaunchParams * OWLLaunchParams
Definition: owl_host.h:306
_OWL_int2::y
int32_t y
Definition: owl_host.h:223
_OWL_affine3f::vz
owl3f vz
Definition: owl_host.h:244
owl3l
struct _OWL_long3 owl3l
_OWL_double3::x
double x
Definition: owl_host.h:235
_OWL_uint3::y
uint32_t y
Definition: owl_host.h:231
owlBufferDestroy
OWL_API void owlBufferDestroy(OWLBuffer buffer)
owlTrianglesGeomGroupCreate
OWL_API OWLGroup owlTrianglesGeomGroupCreate(OWLContext context, size_t numGeometries, OWLGeom *initValues)
OWL_INVALID_TYPE
@ OWL_INVALID_TYPE
Definition: owl_host.h:109
_OWLVarDecl::type
OWLDataType type
Definition: owl_host.h:248
OWL_BUFFER_SIZE
@ OWL_BUFFER_SIZE
Definition: owl_host.h:112
OWL_float
float OWL_float
Definition: owl_host.h:216
owl4i
struct _OWL_int4 owl4i
_OWL_int3::z
int32_t z
Definition: owl_host.h:230
_OWL_ulong4::z
uint64_t z
Definition: owl_host.h:240
OWL_uint
uint32_t OWL_uint
Definition: owl_host.h:219