-
Notifications
You must be signed in to change notification settings - Fork 0
Home
HojinNamm edited this page May 19, 2026
·
11 revisions
Based on
include/ndc.h
Complete API reference including typedefs, enumerations, and function signatures.
-
Typedefs —
NDCcontext,NDCdevice,NDCmodule,NDCfunction, etc. -
Enumerations —
NDCresult_enum,NDCdevice_attr_enum - Functions — all NDC API functions with parameters and return codes
Step-by-step guide to using the NDC API, from platform initialization through resource cleanup.
- Platform initialization and device discovery
- Context and module creation
- Kernel loading and function retrieval
- Memory allocation, CPU cache flushing, and address translation
- Kernel launch and resource release
- Error exception handling
How to write kernels that run on the NDC device, including argument mapping with MMAP_KERNEL_ARGS and cache synchronization.
- Defining kernel arguments
- Writing the kernel
main()function - Memory mapping and cleanup
| Task | Function |
|---|---|
| Initialize the platform | ndcInitPlatform() |
| Discover devices |
ndcGetDeviceCount(), ndcGetDevice(), ndcGetDeviceName()
|
| Manage contexts |
ndcCreateContext(), ndcSetContext(), ndcDeleteContext()
|
| Load kernels |
ndcCreateModule(), ndcLoadModule(), ndcGetFunc()
|
| Manage device memory |
ndcMemAlloc(), ndcMemFree(), ndcMemGetInfo()
|
| Synchronize and address |
ndcMemFlushCpuCache(), ndcMemGetDevicePointer()
|
| Launch kernels | ndcLaunchFunc() |