Skip to content
HojinNamm edited this page May 19, 2026 · 11 revisions

NDC API Documentation

Based on include/ndc.h


Table of Contents

Complete API reference including typedefs, enumerations, and function signatures.

  • TypedefsNDCcontext, NDCdevice, NDCmodule, NDCfunction, etc.
  • EnumerationsNDCresult_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

Quick Reference

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()

Clone this wiki locally