-
Notifications
You must be signed in to change notification settings - Fork 8
/
hiprt.h.in
600 lines (556 loc) · 23 KB
/
hiprt.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
//////////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
//////////////////////////////////////////////////////////////////////////////////////////
#pragma once
#define HIPRT_MAJOR_VERSION @HIPRT_MAJOR_VERSION@
#define HIPRT_MINOR_VERSION @HIPRT_MINOR_VERSION@
#define HIPRT_PATCH_VERSION @HIPRT_PATCH_VERSION@
#define HIPRT_API_VERSION @HIPRT_API_VERSION@
#define HIPRT_VERSION_STR @HIPRT_VERSION_STR@
#define HIP_VERSION_STR @HIP_VERSION_STR@
#include <hiprt/hiprt_types.h>
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#if defined( _MSC_VER )
#ifdef HIPRT_EXPORTS
#define HIPRT_API __declspec( dllexport )
#else
#define HIPRT_API __declspec( dllimport )
#endif
#elif defined( __GNUC__ )
#ifdef HIPRT_EXPORTS
#define HIPRT_API __attribute__( ( visibility( "default" ) ) )
#else
#define HIPRT_API
#endif
#else
#define HIPRT_API
#pragma warning Unknown dynamic link import / export semantics.
#endif
/** \brief Creates HIPRT API context.
*
* All HIPRT functions expect context as their first argument. Context
* keeps global data required by HIPRT session. Calls made from different
* threads with different HIPRT contexts are safe. Calls with the same context
* should be externally synchronized by the client.
*
* \param hiprtApiVersion The API version.
* \param contextOut The created context.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError
hiprtCreateContext( uint32_t hiprtApiVersion, const hiprtContextCreationInput& input, hiprtContext& contextOut );
/** \brief Destorys the HIPRT API context.
*
* Destroys all the global resources used by HIPRT session. Further calls
* with this context are prohibited.
*
* \param context The API context.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtDestroyContext( hiprtContext context );
/** \brief Creates a geometry.
*
* This function creates
* hiprtGeometry representing acceleration structure topology.
*
* \param context The HIPRT API context.
* \param buildInput An input parameters for the build.
* \param buildOptions Various flags controlling build process.
* \param geometryOut The resulting geometry.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtCreateGeometry(
hiprtContext context,
const hiprtGeometryBuildInput& buildInput,
const hiprtBuildOptions buildOptions,
hiprtGeometry& geometryOut );
/** \brief Creates geometries.
*
* This function creates an array of
* hiprtGeometry representing acceleration structure topology.
*
* \param context The HIPRT API context.
* \param numGeometries The number of geometries to be created.
* \param buildInputs An array of build input structs.
* \param buildOptions Various flags controlling build process.
* \param geometriesOut The resulting geometries.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtCreateGeometries(
hiprtContext context,
uint32_t numGeometries,
const hiprtGeometryBuildInput* buildInputs,
const hiprtBuildOptions buildOptions,
hiprtGeometry** geometriesOut );
/** \brief Destroys a geometry.
*
* This function destroys
* hiprtGeometry representing acceleration structure topology.
*
* \param context The HIPRT API context.
* \param geometry The geometry.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtDestroyGeometry( hiprtContext context, hiprtGeometry geometry );
/** \brief Destroys geometries.
*
* This function destroys an array of
* hiprtGeometry representing acceleration structure topology.
*
* \param context The HIPRT API context.
* \param numGeometries The number of geometries to be created.
* \param geometry The geometries.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtDestroyGeometries( hiprtContext context, uint32_t numGeometries, hiprtGeometry* geometries );
/** \brief Builds or updates a geometry.
*
* Given geometry description from the client, this function builds
* hiprtGeometry representing acceleration structure topology (in case of a
* build) or updates acceleration structure keeping topology intact (update).
*
* \param context The HIPRT API context.
* \param buildOperation The type of the build operation.
* \param buildInput An input parameters for the build.
* \param buildOptions Various flags controlling build process.
* \param temporaryBuffer A temporary buffer for the build.
* \param stream A stream used for the build.
* \param geometryOut Resulting geometry.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtBuildGeometry(
hiprtContext context,
hiprtBuildOperation buildOperation,
const hiprtGeometryBuildInput& buildInput,
const hiprtBuildOptions buildOptions,
hiprtDevicePtr temporaryBuffer,
hiprtApiStream stream,
hiprtGeometry geometryOut );
/** \brief Builds or updates geometries.
*
* Given geometry description from the client, this function builds
* hiprtGeometry representing acceleration structure topology (in case of a
* build) or updates acceleration structure keeping topology intact (update).
*
* \param context The HIPRT API context.
* \param buildOperation The type of the build operation.
* \param numGeometries The number of geometries to be built.
* \param buildInputs An array of build input structs.
* \param buildOptions Various flags controlling build process.
* \param temporaryBuffer A temporary buffer for the build.
* \param stream A stream used for the build.
* \param geometriesOut Resulting geometries.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtBuildGeometries(
hiprtContext context,
hiprtBuildOperation buildOperation,
uint32_t numGeometries,
const hiprtGeometryBuildInput* buildInputs,
const hiprtBuildOptions buildOptions,
hiprtDevicePtr temporaryBuffer,
hiprtApiStream stream,
hiprtGeometry* geometriesOut );
/** \brief Returns temporary storage requirements for geometry build.
*
* \param context The HIPRT API context.
* \param buildInput An input parameters for the build.
* \param buildOptions Various flags controlling build process.
* \param sizeOut The resulting size.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtGetGeometryBuildTemporaryBufferSize(
hiprtContext context, const hiprtGeometryBuildInput& buildInput, const hiprtBuildOptions buildOptions, size_t& sizeOut );
/** \brief Returns temporary storage requirements for geometry build.
*
* \param context The HIPRT API context.
* \param numGeometries The number of geometries to be built.
* \param buildInputs An array of build input structs.
* \param buildOptions Various flags controlling build process.
* \param sizeOut The resulting size.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtGetGeometriesBuildTemporaryBufferSize(
hiprtContext context,
uint32_t numGeometries,
const hiprtGeometryBuildInput* buildInputs,
const hiprtBuildOptions buildOptions,
size_t& sizeOut );
/** \brief Compacts geometry.
*
* This function compacts hiprtGeometry, reducing used memory.
* The input geometry are automatically destroyed.
*
* \param context The HIPRT API context.
* \param stream A stream used for the compaction.
* \param geometryIn The input geometry to be compacted.
* \param geometryOut The compacted geometry.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError
hiprtCompactGeometry( hiprtContext context, hiprtApiStream stream, hiprtGeometry geometryIn, hiprtGeometry& geometryOut );
/** \brief Compacts geometries.
*
* This function compacts an array of
* hiprtGeometry, reducing used memory.
* The input geometries are automatically destroyed.
*
* \param context The HIPRT API context.
* \param numGeometries The number of geometries to be compacted.
* \param stream A stream used for the compaction.
* \param geometriesIn The input geometries to be compacted.
* \param geometriesOut The compacted geometries.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtCompactGeometries(
hiprtContext context,
uint32_t numGeometries,
hiprtApiStream stream,
hiprtGeometry* geometriesIn,
hiprtGeometry** geometriesOut );
/** \brief Creates a scene.
*
* This function creates
* hiprtScene representing acceleration structure topology.
*
* \param context The HIPRT API context.
* \param buildInput An input parameters for the build.
* \param buildOptions Various flags controlling build process.
* \param sceneOut The resulting scene.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtCreateScene(
hiprtContext context, const hiprtSceneBuildInput& buildInput, const hiprtBuildOptions buildOptions, hiprtScene& sceneOut );
/** \brief Creates scenes.
*
* This function creates
* hiprtScene representing acceleration structure topology.
*
* \param context The HIPRT API context.
* \param numScenes The number of scenes to be created.
* \param buildInputs An array of build input structs.
* \param buildOptions Various flags controlling build process.
* \param scenesOut The resulting scenes.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtCreateScenes(
hiprtContext context,
uint32_t numScenes,
const hiprtSceneBuildInput* buildInputs,
const hiprtBuildOptions buildOptions,
hiprtScene** scenesOut );
/** \brief Destroys a scene.
*
* This function destroys
* hiprtScene representing acceleration structure topology.
*
* \param context The HIPRT API context.
* \param scene The scene.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtDestroyScene( hiprtContext context, hiprtScene scene );
/** \brief Destroys scenes.
*
* This function destroys array of
* hiprtScene representing acceleration structure topology.
*
* \param context The HIPRT API context.
* \param numScenes The number of scenes to be destroyed.
* \param scenes The scenes.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtDestroyScenes( hiprtContext context, uint32_t numScenes, hiprtScene* scenes );
/** \brief Builds or updates a scene.
*
* Given a number of hiprtGeometries from the client, this function builds
* hiprtScene representing top level acceleration structure topology (in case of
* a build) or updates acceleration structure keeping topology intact (update).
*
* \param context The HIPRT API context.
* \param buildOperation The type of the build operation.
* \param buildInput An input parameters for the build.
* \param buildOptions Various flags controlling build process.
* \param temporaryBuffer A temporary buffer for build operation.
* \param stream A stream used for the build.
* \param sceneOut The resulting scene.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtBuildScene(
hiprtContext context,
hiprtBuildOperation buildOperation,
const hiprtSceneBuildInput& buildInput,
const hiprtBuildOptions buildOptions,
hiprtDevicePtr temporaryBuffer,
hiprtApiStream stream,
hiprtScene sceneOut );
/** \brief Builds or updates scenes.
*
* Given a number of hiprtGeometries from the client, this function builds
* hiprtScene representing top level acceleration structure topology (in case of
* a build) or updates acceleration structure keeping topology intact (update).
*
* \param context The HIPRT API context.
* \param buildOperation The type of the build operation.
* \param numScenes The number of scenes to be built.
* \param buildInputs An array of build input structs.
* \param buildOptions Various flags controlling build process.
* \param temporaryBuffer A temporary buffer for build operation.
* \param stream A stream used for the build.
* \param scenesOut The resulting scenes.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtBuildScenes(
hiprtContext context,
hiprtBuildOperation buildOperation,
uint32_t numScenes,
const hiprtSceneBuildInput* buildInputs,
const hiprtBuildOptions buildOptions,
hiprtDevicePtr temporaryBuffer,
hiprtApiStream stream,
hiprtScene* scenesOut );
/** \brief Returns temporary storage requirements for scene build.
*
* \param context The HIPRT API context.
* \param buildInput An input parameters for the build.
* \param buildOptions Various flags controlling build process.
* \param sizeOut The resulting size.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtGetSceneBuildTemporaryBufferSize(
hiprtContext context, const hiprtSceneBuildInput& buildInput, const hiprtBuildOptions buildOptions, size_t& sizeOut );
/** \brief Returns temporary storage requirements for scene build.
*
* \param context The HIPRT API context.
* \param numScenes The number of scenes to be built.
* \param buildInput An input parameters for the build.
* \param buildOptions Various flags controlling build process.
* \param sizeOut The resulting size.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtGetScenesBuildTemporaryBufferSize(
hiprtContext context,
uint32_t numScenes,
const hiprtSceneBuildInput* buildInput,
const hiprtBuildOptions buildOptions,
size_t& sizeOut );
/** \brief Compacts scene.
*
* This function compacts hiprtScene, reducing used memory.
* The input scene are automatically destroyed.
*
* \param context The HIPRT API context.
* \param stream A stream used for the compaction.
* \param sceneIn The input scene to be compacted.
* \param sceneOut The compacted scene.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtCompactScene( hiprtContext context, hiprtApiStream stream, hiprtScene sceneIn, hiprtScene& sceneOut );
/** \brief Compacts scenes.
*
* This function compacts an array of
* hiprtScene, reducing used memory.
* The input scenes are automatically destroyed.
*
* \param context The HIPRT API context.
* \param numScenes The number of scenes to be compacted.
* \param stream A stream used for the compaction.
* \param scenesIn The input scenes to be compacted.
* \param scenesOut The compacted scenes.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtCompactScenes(
hiprtContext context, uint32_t numScenes, hiprtApiStream stream, hiprtScene* scenesIn, hiprtScene** scenesOut );
/** \brief Creates a custom function table.
*
* \param context The HIPRT API context.
* \param numGeomTypes The number of geometry types.
* \param numRayTypes The number of ray types.
* \param funcTableOut The resulting table.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError
hiprtCreateFuncTable( hiprtContext context, uint32_t numGeomTypes, uint32_t numRayTypes, hiprtFuncTable& funcTableOut );
/** \brief Sets an entry in the function table.
*
* \param context The HIPRT API context.
* \param funcTable The function table.
* \param geomType The geometry type.
* \param rayType The ray type.
* \param set The function set to be assigned.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError
hiprtSetFuncTable( hiprtContext context, hiprtFuncTable funcTable, uint32_t geomType, uint32_t rayType, hiprtFuncDataSet set );
/** \brief Destroys a custom function table.
*
* \param context The HIPRT API context.
* \param funcTable The function table.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtDestroyFuncTable( hiprtContext context, hiprtFuncTable funcTable );
/** \brief Creates a stack buffer (for hiprtGlobalStack or hiprtDynamicStack).
*
* \param context The HIPRT API context.
* \param input The input information needed for the stack buffer allocation.
* \param stackBufferOut The stack buffer.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtCreateGlobalStackBuffer(
hiprtContext context, const hiprtGlobalStackBufferInput& input, hiprtGlobalStackBuffer& stackBufferOut );
/** \brief Destroys a stack buffer.
*
* \param context The HIPRT API context.
* \param stackBuffer The stack buffer.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtDestroyGlobalStackBuffer( hiprtContext context, hiprtGlobalStackBuffer stackBuffer );
/** \brief Saves hiprtGeometry to a binary file.
*
* \param context The HIPRT API context.
* \param geometry The geometry to be saved.
* \param filename The file name with full path.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtSaveGeometry( hiprtContext context, hiprtGeometry geometry, const char* filename );
/** \brief Loads hiprtGeometry to a binary file.
*
* \param context The HIPRT API context.
* \param geometryOut The geometry to be loaded.
* \param filename The file name with full path.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtLoadGeometry( hiprtContext context, hiprtGeometry& geometryOut, const char* filename );
/** \brief Saves hiprtScene to a binary file.
*
* \param context The HIPRT API context.
* \param scene The scene to be saved.
* \param filename The file name with full path.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtSaveScene( hiprtContext context, hiprtScene scene, const char* filename );
/** \brief Loads hiprtScene to a binary file.
*
* \param context The HIPRT API context.
* \param sceneOut The scene to be loaded.
* \param filename The file name with full path.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtLoadScene( hiprtContext context, hiprtScene& sceneOut, const char* filename );
/** \brief Outputs scene's AABB.
*
* \param context The HIPRT API context.
* \param geometry The geometry to be queried.
* \param aabbMinOut The bounding box min. bound.
* \param aabbMaxOut The bounding box max. bound.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError
hiprtExportGeometryAabb( hiprtContext context, hiprtGeometry geometry, hiprtFloat3& aabbMinOut, hiprtFloat3& aabbMaxOut );
/** \brief Outputs scene AABB.
*
* \param context The HIPRT API context.
* \param scene The scene to be queried.
* \param aabbMinOut The bounding box min. bound.
* \param aabbMaxOut The bounding box max. bound.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError
hiprtExportSceneAabb( hiprtContext context, hiprtScene scene, hiprtFloat3& aabbMinOut, hiprtFloat3& aabbMaxOut );
/** \brief Returns function instance with HIPRT routines.
* \param context The HIPRT API context.
* \param numFunctions The number of functions to compile.
* \param funcNames Functions to to be returned, cannot be nullptr.
* \param src The module source code.
* \param moduleName The name of the module.
* \param numHeaders The number of headers.
* \param headers Sources of the headers, headers can be nullptr when numHeaders is 0.
* \param includeNames The header names to be included to the module, includeNames can be nullptr
* when numHeaders is 0.
* \param numOptions Number of compiler options, can be 0.
* \param options The compiler options, can be nullptr.
* \param numGeomTypes The number of geometry types.
* \param numRayTypes The number of ray types.
* \param funcNameSets The table of custom function names (numRayTypes x numGeomTypes).
* \param functionsOut The output function instances.
* \param moduleOut The output module instance, can be nullptr.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtBuildTraceKernels(
hiprtContext context,
uint32_t numFunctions,
const char** funcNames,
const char* src,
const char* moduleName,
uint32_t numHeaders,
const char** headers,
const char** includeNames,
uint32_t numOptions,
const char** options,
uint32_t numGeomTypes,
uint32_t numRayTypes,
hiprtFuncNameSet* funcNameSets,
hiprtApiFunction* functionsOut,
hiprtApiModule* moduleOut,
bool cache );
/** \brief Get function instance with HIPRT routines.
* \param context The HIPRT API context.
* \param numFunctions The number of functions to compile.
* \param funcNames Functions to to be returned, cannot be nullptr.
* \param moduleName The name of the bitcode module.
* \param bitcodeBinary The user compiled bitcode.
* \param bitcodeBinarySize The size of the compiled bitcode.
* \param numGeomTypes The number of geometry types.
* \param numRayTypes The number of ray types.
* \param funcNameSets The table of custom function names (numRayTypes x numGeomTypes).
* \param functionsOut The output function instances.
* \return A HIPRT error in case of a failure, hiprtSuccess otherwise.
*/
HIPRT_API hiprtError hiprtBuildTraceKernelsFromBitcode(
hiprtContext context,
uint32_t numFunctions,
const char** funcNames,
const char* moduleName,
const char* bitcodeBinary,
size_t bitcodeBinarySize,
uint32_t numGeomTypes,
uint32_t numRayTypes,
hiprtFuncNameSet* funcNameSets,
hiprtApiFunction* functionsOut,
bool cache );
/** \brief Setting log level.
* \param context The HIPRT API context.
* \param path A user defined path to cache kernels.
*/
HIPRT_API void hiprtSetCacheDirPath( hiprtContext context, const char* path );
/** \brief Sets the log level.
*
* \param level The desired log level.
*/
HIPRT_API void hiprtSetLogLevel( hiprtLogLevel level );
#ifdef __cplusplus
}
#endif