|
8 | 8 | //
|
9 | 9 | //===----------------------------------------------------------------------===//
|
10 | 10 |
|
| 11 | +#include "common.hpp" |
11 | 12 | #include <ur_api.h>
|
12 | 13 | #include <ur_ddi.h>
|
13 | 14 |
|
@@ -409,4 +410,42 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetProgramExpProcAddrTable(
|
409 | 410 |
|
410 | 411 | return UR_RESULT_SUCCESS;
|
411 | 412 | }
|
| 413 | + |
| 414 | +UR_DLLEXPORT ur_result_t UR_APICALL urAllAddrTable(ur_api_version_t version, |
| 415 | + ur_dditable_t *pDdiTable) { |
| 416 | + urGetGlobalProcAddrTable(version, &pDdiTable->Global); |
| 417 | + urGetBindlessImagesExpProcAddrTable(version, &pDdiTable->BindlessImagesExp); |
| 418 | + urGetCommandBufferExpProcAddrTable(version, &pDdiTable->CommandBufferExp); |
| 419 | + urGetContextProcAddrTable(version, &pDdiTable->Context); |
| 420 | + urGetEnqueueProcAddrTable(version, &pDdiTable->Enqueue); |
| 421 | + urGetEnqueueExpProcAddrTable(version, &pDdiTable->EnqueueExp); |
| 422 | + urGetEventProcAddrTable(version, &pDdiTable->Event); |
| 423 | + urGetKernelProcAddrTable(version, &pDdiTable->Kernel); |
| 424 | + urGetKernelExpProcAddrTable(version, &pDdiTable->KernelExp); |
| 425 | + urGetMemProcAddrTable(version, &pDdiTable->Mem); |
| 426 | + urGetPhysicalMemProcAddrTable(version, &pDdiTable->PhysicalMem); |
| 427 | + urGetPlatformProcAddrTable(version, &pDdiTable->Platform); |
| 428 | + urGetProgramProcAddrTable(version, &pDdiTable->Program); |
| 429 | + urGetProgramExpProcAddrTable(version, &pDdiTable->ProgramExp); |
| 430 | + urGetQueueProcAddrTable(version, &pDdiTable->Queue); |
| 431 | + urGetSamplerProcAddrTable(version, &pDdiTable->Sampler); |
| 432 | + urGetUSMProcAddrTable(version, &pDdiTable->USM); |
| 433 | + urGetUSMExpProcAddrTable(version, &pDdiTable->USMExp); |
| 434 | + urGetUsmP2PExpProcAddrTable(version, &pDdiTable->UsmP2PExp); |
| 435 | + urGetVirtualMemProcAddrTable(version, &pDdiTable->VirtualMem); |
| 436 | + urGetDeviceProcAddrTable(version, &pDdiTable->Device); |
| 437 | + urGetAdapterProcAddrTable(version, &pDdiTable->Adapter); |
| 438 | + |
| 439 | + return UR_RESULT_SUCCESS; |
| 440 | +} |
| 441 | + |
412 | 442 | } // extern "C"
|
| 443 | + |
| 444 | +const ur_dditable_t *ur::offload::ddi_getter::value() { |
| 445 | + static std::once_flag flag; |
| 446 | + static ur_dditable_t table; |
| 447 | + |
| 448 | + std::call_once(flag, |
| 449 | + []() { urAllAddrTable(UR_API_VERSION_CURRENT, &table); }); |
| 450 | + return &table; |
| 451 | +} |
0 commit comments