API Overview
The complete Aicraft API at a glance.
Single Include
#include "aicraft/aicraft.h"
This includes all sub-modules. You can also include individual headers:
#include "aicraft/tensor.h"
#include "aicraft/layers.h"
#include "aicraft/autograd.h"
Module Map
| Module | Header | Description |
|---|---|---|
| Tensor | tensor.h | N-dimensional tensor creation and operations |
| Autograd | autograd.h | Reverse-mode automatic differentiation |
| Layers | layers.h | Neural network layers (Dense, etc.) |
| Loss | loss.h | Loss functions (CE, MSE, Huber) |
| Optimizer | optimizer.h | Optimisers (SGD, Adam, AdamW) |
| Memory | memory.h | Arena allocator with checkpoint/restore |
| SIMD | simd.h | Platform-specific vectorised kernels |
| Quantize | quantize.h | INT8 post-training quantisation |
| Vulkan | vulkan.h | GPU compute backend |
Lifecycle
ac_init(); // Initialise framework
// ... use API ...
ac_cleanup(); // Release all resources
Conventions
- All public symbols are prefixed with
ac_orAc - Types use PascalCase:
AcTensor,AcLayer,AcOptimizer - Functions use snake_case:
ac_tensor_new,ac_forward_seq - Constants use SCREAMING_CASE:
AC_RELU,AC_QUANT_INT8