Graph Declaration - Graph Declaration - 2026.1 English - UG1603

AI Engine-ML Kernel and Graph Programming Guide (UG1603)

Document ID
UG1603
Release Date
2026-07-08
Version
2026.1 English

Declare the shared buffer with zero input ports. The third argument specifies the number of output ports (consuming kernels).

// '0' input ports: buffer is populated by the host via g.update()
wts = adf::shared_buffer<int32>::create({2*SAMPLES}, 0, 2);
adf::connect(wts.out[0], k1.in[1]);
adf::connect(wts.out[1], k2.in[1]);