HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
oidn.h
Go to the documentation of this file.
1 // Copyright 2018 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 
4 #pragma once
5 
6 #include <stddef.h>
7 #include <stdbool.h>
8 #include <stdint.h>
9 
10 #include "config.h"
11 
12 #if defined(__cplusplus)
13  #if defined(SYCL_LANGUAGE_VERSION)
14  #include <CL/sycl.hpp>
15  #else
16  namespace sycl
17  {
18  class queue;
19  class event;
20  }
21  #endif
22 #endif
23 
24 typedef struct CUstream_st* cudaStream_t;
25 typedef struct ihipStream_t* hipStream_t;
26 
27 #if defined(__OBJC__)
28  @protocol MTLCommandQueue;
29  @protocol MTLBuffer;
30 
33 #else
34  typedef void* MTLCommandQueue_id;
35  typedef void* MTLBuffer_id;
36 #endif
37 
39 
40 // -------------------------------------------------------------------------------------------------
41 // Physical Device
42 // -------------------------------------------------------------------------------------------------
43 
44 #define OIDN_UUID_SIZE 16u // size of a universally unique identifier (UUID) of a physical device
45 #define OIDN_LUID_SIZE 8u // size of a locally unique identifier (LUID) of a physical device
46 
47 // Returns the number of supported physical devices.
49 
50 // Gets a boolean parameter of the physical device.
51 OIDN_API bool oidnGetPhysicalDeviceBool(int physicalDeviceID, const char* name);
52 
53 // Gets an integer parameter of the physical device.
54 OIDN_API int oidnGetPhysicalDeviceInt(int physicalDeviceID, const char* name);
55 
56 // Gets an unsigned integer parameter of the physical device.
57 inline unsigned int oidnGetPhysicalDeviceUInt(int physicalDeviceID, const char* name)
58 {
59  return (unsigned int)oidnGetPhysicalDeviceInt(physicalDeviceID, name);
60 }
61 
62 // Gets a string parameter of the physical device.
63 OIDN_API const char* oidnGetPhysicalDeviceString(int physicalDeviceID, const char* name);
64 
65 // Gets an opaque data parameter of the physical device.
66 OIDN_API const void* oidnGetPhysicalDeviceData(int physicalDeviceID, const char* name,
67  size_t* byteSize);
68 
69 // -------------------------------------------------------------------------------------------------
70 // Device
71 // -------------------------------------------------------------------------------------------------
72 
73 // Device types
74 typedef enum
75 {
76  OIDN_DEVICE_TYPE_DEFAULT = 0, // select device automatically
77 
78  OIDN_DEVICE_TYPE_CPU = 1, // CPU device
79  OIDN_DEVICE_TYPE_SYCL = 2, // SYCL device
80  OIDN_DEVICE_TYPE_CUDA = 3, // CUDA device
81  OIDN_DEVICE_TYPE_HIP = 4, // HIP device
82  OIDN_DEVICE_TYPE_METAL = 5, // Metal device
84 
85 // Error codes
86 typedef enum
87 {
88  OIDN_ERROR_NONE = 0, // no error occurred
89  OIDN_ERROR_UNKNOWN = 1, // an unknown error occurred
90  OIDN_ERROR_INVALID_ARGUMENT = 2, // an invalid argument was specified
91  OIDN_ERROR_INVALID_OPERATION = 3, // the operation is not allowed
92  OIDN_ERROR_OUT_OF_MEMORY = 4, // not enough memory to execute the operation
93  OIDN_ERROR_UNSUPPORTED_HARDWARE = 5, // the hardware (e.g. CPU) is not supported
94  OIDN_ERROR_CANCELLED = 6, // the operation was cancelled by the user
95 } OIDNError;
96 
97 // Error callback function
98 typedef void (*OIDNErrorFunction)(void* userPtr, OIDNError code, const char* message);
99 
100 // Device handle
101 typedef struct OIDNDeviceImpl* OIDNDevice;
102 
103 // Creates a device of the specified type.
105 
106 // Creates a device from a physical device specified by its ID (0 to oidnGetNumPhysicalDevices()-1).
107 OIDN_API OIDNDevice oidnNewDeviceByID(int physicalDeviceID);
108 
109 // Creates a device from a physical device specified by its UUID.
110 OIDN_API OIDNDevice oidnNewDeviceByUUID(const void* uuid);
111 
112 // Creates a device from a physical device specified by its LUID.
113 OIDN_API OIDNDevice oidnNewDeviceByLUID(const void* luid);
114 
115 // Creates a device from a physical device specified by its PCI address.
116 OIDN_API OIDNDevice oidnNewDeviceByPCIAddress(int pciDomain, int pciBus, int pciDevice,
117  int pciFunction);
118 
119 #if defined(__cplusplus)
120 // Creates a device from the specified list of SYCL queues.
121 // The queues should belong to different SYCL sub-devices (Xe Stack/Tile) of the same SYCL
122 // root-device (GPU).
123 OIDN_API OIDNDevice oidnNewSYCLDevice(const sycl::queue* queues, int numQueues);
124 #endif
125 
126 // Creates a device from the specified pairs of CUDA device IDs (negative ID corresponds to the
127 // current device) and streams (null stream corresponds to the default stream).
128 // Currently only one device ID/stream is supported.
129 OIDN_API OIDNDevice oidnNewCUDADevice(const int* deviceIDs, const cudaStream_t* streams,
130  int numPairs);
131 
132 // Creates a device from the specified pairs of HIP device IDs (negative ID corresponds to the
133 // current device) and streams (null stream corresponds to the default stream).
134 // Currently only one device ID/stream is supported.
135 OIDN_API OIDNDevice oidnNewHIPDevice(const int* deviceIDs, const hipStream_t* streams,
136  int numPairs);
137 
138 // Creates a device from the specified list of Metal command queues.
139 // Currently only one queue is supported.
140 OIDN_API OIDNDevice oidnNewMetalDevice(const MTLCommandQueue_id* commandQueues, int numQueues);
141 
142 // Retains the device (increments the reference count).
144 
145 // Releases the device (decrements the reference count).
147 
148 // Sets a boolean parameter of the device.
149 OIDN_API void oidnSetDeviceBool(OIDNDevice device, const char* name, bool value);
150 
151 OIDN_DEPRECATED("oidnSetDevice1b is deprecated. Use oidnSetDeviceBool instead.")
152 inline void oidnSetDevice1b(OIDNDevice device, const char* name, bool value)
153 {
154  oidnSetDeviceBool(device, name, value);
155 }
156 
157 // Sets an integer parameter of the device.
158 OIDN_API void oidnSetDeviceInt(OIDNDevice device, const char* name, int value);
159 
160 OIDN_DEPRECATED("oidnSetDevice1i is deprecated. Use oidnSetDeviceInt instead.")
161 inline void oidnSetDevice1i(OIDNDevice device, const char* name, int value)
162 {
163  oidnSetDeviceInt(device, name, value);
164 }
165 
166 // Sets an unsigned integer parameter of the device.
167 inline void oidnSetDeviceUInt(OIDNDevice device, const char* name, unsigned int value)
168 {
169  oidnSetDeviceInt(device, name, (int)value);
170 }
171 
172 // Gets a boolean parameter of the device.
173 OIDN_API bool oidnGetDeviceBool(OIDNDevice device, const char* name);
174 
175 OIDN_DEPRECATED("oidnGetDevice1b is deprecated. Use oidnGetDeviceBool instead.")
176 inline bool oidnGetDevice1b(OIDNDevice device, const char* name)
177 {
178  return oidnGetDeviceBool(device, name);
179 }
180 
181 // Gets an integer parameter of the device.
182 OIDN_API int oidnGetDeviceInt(OIDNDevice device, const char* name);
183 
184 // Gets an unsigned integer parameter of the device.
185 inline unsigned int oidnGetDeviceUInt(OIDNDevice device, const char* name)
186 {
187  return (unsigned int)oidnGetDeviceInt(device, name);
188 }
189 
190 OIDN_DEPRECATED("oidnGetDevice1i is deprecated. Use oidnGetDeviceInt instead.")
191 inline int oidnGetDevice1i(OIDNDevice device, const char* name)
192 {
193  return oidnGetDeviceInt(device, name);
194 }
195 
196 // Sets the error callback function of the device.
198 
199 // Returns the first unqueried error code stored in the device for the current thread, optionally
200 // also returning a string message (if not NULL), and clears the stored error. Can be called with
201 // a NULL device as well to check for per-thread global errors (e.g. why a device creation or
202 // physical device query has failed).
203 OIDN_API OIDNError oidnGetDeviceError(OIDNDevice device, const char** outMessage);
204 
205 // Commits all previous changes to the device.
206 // Must be called before first using the device (e.g. creating filters).
208 
209 // Waits for all asynchronous operations running on the device to complete.
210 OIDN_API void oidnSyncDevice(OIDNDevice device);
211 
212 // -------------------------------------------------------------------------------------------------
213 // Buffer
214 // -------------------------------------------------------------------------------------------------
215 
216 // Formats for images and other data stored in buffers
217 typedef enum
218 {
220 
221  // 32-bit single-precision floating-point scalar and vector formats
226 
227  // 16-bit half-precision floating-point scalar and vector formats
232 } OIDNFormat;
233 
234 // Storage modes for buffers
235 typedef enum
236 {
238 
239  // stored on the host, accessible by both host and device
241 
242  // stored on the device, *not* accessible by the host
244 
245  // automatically migrated between host and device, accessible by both
246  // *not* supported by all devices, "managedMemorySupported" device parameter should be checked
248 } OIDNStorage;
249 
250 // External memory type flags
251 typedef enum
252 {
254 
255  // opaque POSIX file descriptor handle
257 
258  // file descriptor handle for a Linux dma_buf
260 
261  // NT handle
263 
264  // global share (KMT) handle
266 
267  // NT handle returned by IDXGIResource1::CreateSharedHandle referring to a Direct3D 11 texture
268  // resource
270 
271  // global share (KMT) handle returned by IDXGIResource::GetSharedHandle referring to a Direct3D 11
272  // texture resource
274 
275  // NT handle returned by IDXGIResource1::CreateSharedHandle referring to a Direct3D 11 resource
277 
278  // global share (KMT) handle returned by IDXGIResource::GetSharedHandle referring to a Direct3D 11
279  // resource
281 
282  // NT handle returned by ID3D12Device::CreateSharedHandle referring to a Direct3D 12 heap
283  // resource
285 
286  // NT handle returned by ID3D12Device::CreateSharedHandle referring to a Direct3D 12 committed
287  // resource
290 
291 // Buffer handle
292 typedef struct OIDNBufferImpl* OIDNBuffer;
293 
294 // Creates a buffer accessible to both the host and device.
295 OIDN_API OIDNBuffer oidnNewBuffer(OIDNDevice device, size_t byteSize);
296 
297 // Creates a buffer with the specified storage mode.
299 
300 // Creates a shared buffer from memory allocated and owned by the user and accessible to the device.
301 OIDN_API OIDNBuffer oidnNewSharedBuffer(OIDNDevice device, void* devPtr, size_t byteSize);
302 
303 // Creates a shared buffer by importing external memory from a POSIX file descriptor.
306  int fd, size_t byteSize);
307 
308 // Creates a shared buffer by importing external memory from a Win32 handle.
311  void* handle, const void* name, size_t byteSize);
312 
313 // Creates a shared buffer from a Metal buffer.
314 // Only buffers with shared or private storage and hazard tracking are supported.
316 
317 // Gets the size of the buffer in bytes.
319 
320 // Gets the storage mode of the buffer.
322 
323 // Gets a pointer to the buffer data, which is accessible to the device but not necessarily to
324 // the host as well, depending on the storage mode. Null pointer may be returned if the buffer
325 // is empty or getting a pointer to data with device storage is not supported by the device.
327 
328 // Copies data from a region of the buffer to host memory.
329 OIDN_API void oidnReadBuffer(OIDNBuffer buffer, size_t byteOffset, size_t byteSize, void* dstHostPtr);
330 
331 // Copies data from a region of the buffer to host memory asynchronously.
333  size_t byteOffset, size_t byteSize, void* dstHostPtr);
334 
335 // Copies data to a region of the buffer from host memory.
337  size_t byteOffset, size_t byteSize, const void* srcHostPtr);
338 
339 // Copies data to a region of the buffer from host memory asynchronously.
341  size_t byteOffset, size_t byteSize, const void* srcHostPtr);
342 
343 // Retains the buffer (increments the reference count).
345 
346 // Releases the buffer (decrements the reference count).
348 
349 // -------------------------------------------------------------------------------------------------
350 // Filter
351 // -------------------------------------------------------------------------------------------------
352 
353 // Filter quality/performance modes
354 typedef enum
355 {
356  OIDN_QUALITY_DEFAULT = 0, // default quality
357 
358 //OIDN_QUALITY_FAST = 4
359  OIDN_QUALITY_BALANCED = 5, // balanced quality/performance (for interactive/real-time rendering)
360  OIDN_QUALITY_HIGH = 6, // high quality (for final-frame rendering)
361 } OIDNQuality;
362 
363 // Progress monitor callback function
364 typedef bool (*OIDNProgressMonitorFunction)(void* userPtr, double n);
365 
366 // Filter handle
367 typedef struct OIDNFilterImpl* OIDNFilter;
368 
369 // Creates a filter of the specified type (e.g. "RT").
370 OIDN_API OIDNFilter oidnNewFilter(OIDNDevice device, const char* type);
371 
372 // Retains the filter (increments the reference count).
374 
375 // Releases the filter (decrements the reference count).
377 
378 // Sets an image parameter of the filter with data stored in a buffer.
379 // If pixelByteStride and/or rowByteStride are zero, these will be computed automatically.
382  size_t width, size_t height,
383  size_t byteOffset,
384  size_t pixelByteStride, size_t rowByteStride);
385 
386 // Sets an image parameter of the filter with data owned by the user and accessible to the device.
387 // If pixelByteStride and/or rowByteStride are zero, these will be computed automatically.
389  void* devPtr, OIDNFormat format,
390  size_t width, size_t height,
391  size_t byteOffset,
392  size_t pixelByteStride, size_t rowByteStride);
393 
394 // Unsets an image parameter of the filter that was previously set.
396 
397 OIDN_DEPRECATED("oidnRemoveFilterImage is deprecated. Use oidnUnsetFilterImage instead.")
398 inline void oidnRemoveFilterImage(OIDNFilter filter, const char* name)
399 {
400  oidnUnsetFilterImage(filter, name);
401 }
402 
403 // Sets an opaque data parameter of the filter owned by the user and accessible to the host.
405  void* hostPtr, size_t byteSize);
406 
407 // Notifies the filter that the contents of an opaque data parameter has been changed.
409 
410 // Unsets an opaque data parameter of the filter that was previously set.
412 
413 OIDN_DEPRECATED("oidnRemoveFilterData is deprecated. Use oidnUnsetFilterData instead.")
414 inline void oidnRemoveFilterData(OIDNFilter filter, const char* name)
415 {
416  oidnUnsetFilterData(filter, name);
417 }
418 
419 // Sets a boolean parameter of the filter.
420 OIDN_API void oidnSetFilterBool(OIDNFilter filter, const char* name, bool value);
421 
422 OIDN_DEPRECATED("oidnSetFilter1b is deprecated. Use oidnSetFilterBool instead.")
423 inline void oidnSetFilter1b(OIDNFilter filter, const char* name, bool value)
424 {
425  oidnSetFilterBool(filter, name, value);
426 }
427 
428 // Gets a boolean parameter of the filter.
429 OIDN_API bool oidnGetFilterBool(OIDNFilter filter, const char* name);
430 
431 OIDN_DEPRECATED("oidnGetFilter1b is deprecated. Use oidnGetFilterBool instead.")
432 inline bool oidnGetFilter1b(OIDNFilter filter, const char* name)
433 {
434  return oidnGetFilterBool(filter, name);
435 }
436 
437 // Sets an integer parameter of the filter.
438 OIDN_API void oidnSetFilterInt(OIDNFilter filter, const char* name, int value);
439 
440 OIDN_DEPRECATED("oidnSetFilter1i is deprecated. Use oidnSetFilterInt instead.")
441 inline void oidnSetFilter1i(OIDNFilter filter, const char* name, int value)
442 {
443  oidnSetFilterInt(filter, name, value);
444 }
445 
446 // Gets an integer parameter of the filter.
448 
449 OIDN_DEPRECATED("oidnGetFilter1i is deprecated. Use oidnGetFilterInt instead.")
450 inline int oidnGetFilter1i(OIDNFilter filter, const char* name)
451 {
452  return oidnGetFilterInt(filter, name);
453 }
454 
455 // Sets a float parameter of the filter.
456 OIDN_API void oidnSetFilterFloat(OIDNFilter filter, const char* name, float value);
457 
458 OIDN_DEPRECATED("oidnSetFilter1f is deprecated. Use oidnSetFilterFloat instead.")
459 inline void oidnSetFilter1f(OIDNFilter filter, const char* name, float value)
460 {
461  oidnSetFilterFloat(filter, name, value);
462 }
463 
464 // Gets a float parameter of the filter.
465 OIDN_API float oidnGetFilterFloat(OIDNFilter filter, const char* name);
466 
467 OIDN_DEPRECATED("oidnGetFilter1f is deprecated. Use oidnGetFilterFloat instead.")
468 inline float oidnGetFilter1f(OIDNFilter filter, const char* name)
469 {
470  return oidnGetFilterFloat(filter, name);
471 }
472 
473 // Sets the progress monitor callback function of the filter.
475  OIDNProgressMonitorFunction func, void* userPtr);
476 
477 // Commits all previous changes to the filter.
478 // Must be called before first executing the filter.
480 
481 // Executes the filter.
483 
484 // Executes the filter asynchronously.
486 
487 #if defined(__cplusplus)
488 // Executes the filter of a SYCL device using the specified dependent events asynchronously, and
489 // optionally returns an event for completion.
490 OIDN_API void oidnExecuteSYCLFilterAsync(OIDNFilter filter,
491  const sycl::event* depEvents, int numDepEvents,
492  sycl::event* doneEvent);
493 #endif
494 
GLuint GLsizei const GLchar * message
Definition: glcorearb.h:2543
OIDN_API void oidnSetDeviceInt(OIDNDevice device, const char *name, int value)
OIDN_API OIDNDevice oidnNewCUDADevice(const int *deviceIDs, const cudaStream_t *streams, int numPairs)
OIDN_API void oidnExecuteFilterAsync(OIDNFilter filter)
#define OIDN_API_NAMESPACE_BEGIN
Definition: config.h:25
OIDN_API OIDNBuffer oidnNewSharedBufferFromWin32Handle(OIDNDevice device, OIDNExternalMemoryTypeFlag handleType, void *handle, const void *name, size_t byteSize)
OIDN_API void oidnExecuteFilter(OIDNFilter filter)
OIDN_API void oidnReadBufferAsync(OIDNBuffer buffer, size_t byteOffset, size_t byteSize, void *dstHostPtr)
OIDN_API void oidnReleaseDevice(OIDNDevice device)
OIDN_API void oidnSetFilterImage(OIDNFilter filter, const char *name, OIDNBuffer buffer, OIDNFormat format, size_t width, size_t height, size_t byteOffset, size_t pixelByteStride, size_t rowByteStride)
OIDN_API void oidnReleaseFilter(OIDNFilter filter)
void
Definition: png.h:1083
getFileOption("OpenEXR:storage") storage
Definition: HDK_Image.dox:276
OIDN_API void oidnUnsetFilterImage(OIDNFilter filter, const char *name)
OIDNFormat
Definition: oidn.h:217
OIDN_API bool oidnGetDeviceBool(OIDNDevice device, const char *name)
GLuint64 GLenum handleType
Definition: RE_OGL.h:262
int oidnGetFilter1i(OIDNFilter filter, const char *name)
Definition: oidn.h:450
OIDN_API void oidnSetSharedFilterImage(OIDNFilter filter, const char *name, void *devPtr, OIDNFormat format, size_t width, size_t height, size_t byteOffset, size_t pixelByteStride, size_t rowByteStride)
OIDN_API void oidnSetFilterInt(OIDNFilter filter, const char *name, int value)
OIDN_API void oidnUnsetFilterData(OIDNFilter filter, const char *name)
OIDNExternalMemoryTypeFlag
Definition: oidn.h:251
void oidnSetFilter1i(OIDNFilter filter, const char *name, int value)
Definition: oidn.h:441
OIDN_API OIDNDevice oidnNewHIPDevice(const int *deviceIDs, const hipStream_t *streams, int numPairs)
OIDN_API int oidnGetFilterInt(OIDNFilter filter, const char *name)
void oidnSetDevice1i(OIDNDevice device, const char *name, int value)
Definition: oidn.h:161
OIDN_API int oidnGetNumPhysicalDevices()
OIDNStorage
Definition: oidn.h:235
OIDN_API int oidnGetPhysicalDeviceInt(int physicalDeviceID, const char *name)
void oidnRemoveFilterData(OIDNFilter filter, const char *name)
Definition: oidn.h:414
OIDN_API float oidnGetFilterFloat(OIDNFilter filter, const char *name)
struct ihipStream_t * hipStream_t
Definition: oidn.h:25
struct OIDNFilterImpl * OIDNFilter
Definition: oidn.h:367
#define OIDN_API
Definition: config.h:55
OIDN_API void oidnWriteBufferAsync(OIDNBuffer buffer, size_t byteOffset, size_t byteSize, const void *srcHostPtr)
OIDN_API void oidnRetainFilter(OIDNFilter filter)
struct _cl_event * event
Definition: glcorearb.h:2961
void * MTLBuffer_id
Definition: oidn.h:35
OIDN_API void oidnRetainBuffer(OIDNBuffer buffer)
OIDNDeviceType
Definition: oidn.h:74
GLint GLsizei GLsizei height
Definition: glcorearb.h:103
struct OIDNBufferImpl * OIDNBuffer
Definition: oidn.h:292
void(* OIDNErrorFunction)(void *userPtr, OIDNError code, const char *message)
Definition: oidn.h:98
GLdouble n
Definition: glcorearb.h:2008
#define OIDN_API_NAMESPACE_END
Definition: config.h:26
Definition: core.h:760
OIDN_API void oidnUpdateFilterData(OIDNFilter filter, const char *name)
OIDN_API void oidnWriteBuffer(OIDNBuffer buffer, size_t byteOffset, size_t byteSize, const void *srcHostPtr)
OIDN_API void oidnReleaseBuffer(OIDNBuffer buffer)
void * MTLCommandQueue_id
Definition: oidn.h:34
OIDN_API void oidnRetainDevice(OIDNDevice device)
OIDN_API const char * oidnGetPhysicalDeviceString(int physicalDeviceID, const char *name)
OIDN_API void oidnCommitFilter(OIDNFilter filter)
OIDN_API void oidnSetFilterProgressMonitorFunction(OIDNFilter filter, OIDNProgressMonitorFunction func, void *userPtr)
OIDN_API void oidnSetFilterBool(OIDNFilter filter, const char *name, bool value)
GLint GLint GLsizei GLint GLenum format
Definition: glcorearb.h:108
void oidnRemoveFilterImage(OIDNFilter filter, const char *name)
Definition: oidn.h:398
OIDN_API OIDNBuffer oidnNewSharedBufferFromFD(OIDNDevice device, OIDNExternalMemoryTypeFlag fdType, int fd, size_t byteSize)
OIDN_API bool oidnGetPhysicalDeviceBool(int physicalDeviceID, const char *name)
OIDN_API void oidnCommitDevice(OIDNDevice device)
OIDN_API void * oidnGetBufferData(OIDNBuffer buffer)
#define OIDN_DEPRECATED(msg)
Definition: config.h:61
OIDN_API OIDNBuffer oidnNewSharedBufferFromMetal(OIDNDevice device, MTLBuffer_id buffer)
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the queue
Definition: thread.h:623
OIDN_API void oidnSyncDevice(OIDNDevice device)
OIDN_API OIDNBuffer oidnNewBuffer(OIDNDevice device, size_t byteSize)
OIDN_API OIDNDevice oidnNewDevice(OIDNDeviceType type)
GLuint id
Definition: glcorearb.h:655
OIDN_API void oidnSetDeviceErrorFunction(OIDNDevice device, OIDNErrorFunction func, void *userPtr)
void oidnSetFilter1b(OIDNFilter filter, const char *name, bool value)
Definition: oidn.h:423
OIDN_API OIDNStorage oidnGetBufferStorage(OIDNBuffer buffer)
GLuint const GLchar * name
Definition: glcorearb.h:786
OIDN_API OIDNBuffer oidnNewSharedBuffer(OIDNDevice device, void *devPtr, size_t byteSize)
struct CUstream_st * cudaStream_t
Definition: oidn.h:24
OIDN_API OIDNDevice oidnNewMetalDevice(const MTLCommandQueue_id *commandQueues, int numQueues)
OIDN_API size_t oidnGetBufferSize(OIDNBuffer buffer)
OIDN_API void oidnSetFilterFloat(OIDNFilter filter, const char *name, float value)
OIDN_API void oidnSetSharedFilterData(OIDNFilter filter, const char *name, void *hostPtr, size_t byteSize)
OIDN_API OIDNDevice oidnNewDeviceByLUID(const void *luid)
OIDNQuality
Definition: oidn.h:354
GLenum func
Definition: glcorearb.h:783
unsigned int oidnGetDeviceUInt(OIDNDevice device, const char *name)
Definition: oidn.h:185
bool(* OIDNProgressMonitorFunction)(void *userPtr, double n)
Definition: oidn.h:364
OIDNError
Definition: oidn.h:86
float oidnGetFilter1f(OIDNFilter filter, const char *name)
Definition: oidn.h:468
struct OIDNDeviceImpl * OIDNDevice
Definition: oidn.h:101
OIDN_API const void * oidnGetPhysicalDeviceData(int physicalDeviceID, const char *name, size_t *byteSize)
OIDN_API bool oidnGetFilterBool(OIDNFilter filter, const char *name)
bool oidnGetDevice1b(OIDNDevice device, const char *name)
Definition: oidn.h:176
unsigned int oidnGetPhysicalDeviceUInt(int physicalDeviceID, const char *name)
Definition: oidn.h:57
OIDN_API void oidnReadBuffer(OIDNBuffer buffer, size_t byteOffset, size_t byteSize, void *dstHostPtr)
void oidnSetFilter1f(OIDNFilter filter, const char *name, float value)
Definition: oidn.h:459
OIDN_API OIDNDevice oidnNewDeviceByPCIAddress(int pciDomain, int pciBus, int pciDevice, int pciFunction)
GLint GLsizei width
Definition: glcorearb.h:103
bool oidnGetFilter1b(OIDNFilter filter, const char *name)
Definition: oidn.h:432
OIDN_API OIDNBuffer oidnNewBufferWithStorage(OIDNDevice device, size_t byteSize, OIDNStorage storage)
Definition: core.h:1131
OIDN_API OIDNDevice oidnNewDeviceByID(int physicalDeviceID)
int oidnGetDevice1i(OIDNDevice device, const char *name)
Definition: oidn.h:191
void oidnSetDevice1b(OIDNDevice device, const char *name, bool value)
Definition: oidn.h:152
OIDN_API OIDNDevice oidnNewDeviceByUUID(const void *uuid)
OIDN_API OIDNFilter oidnNewFilter(OIDNDevice device, const char *type)
OIDN_API void oidnSetDeviceBool(OIDNDevice device, const char *name, bool value)
void oidnSetDeviceUInt(OIDNDevice device, const char *name, unsigned int value)
Definition: oidn.h:167
type
Definition: core.h:1059
OIDN_API OIDNError oidnGetDeviceError(OIDNDevice device, const char **outMessage)
GLuint64 GLenum GLint fd
Definition: RE_OGL.h:262
OIDN_API int oidnGetDeviceInt(OIDNDevice device, const char *name)
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glcorearb.h:1297