Building & extending

Building & extending#

Task-oriented recipes for building event-driven networks and extending brainevent with your own kernels. For the concepts behind custom kernels, see The custom-kernel architecture.

Choose the network recipe when you want to assemble event-driven communication into a spiking model, or the compilation recipe when you need an operation implemented in native source. The network guide introduces the pattern of sending activity through excitatory and inhibitory connectivity and points to complete COBA and CUBA examples. The compilation guide shows how to make C++ or CUDA code callable from JAX through the provided loading interface. Before adapting either recipe, identify the shapes of the arrays entering your computation and the result you expect to produce. For native kernels, also check the compiler and device requirements described in the guide. Use the linked architecture explanation to understand the compilation bridge, and consult the kernel reference when you need details about argument specifications, compiler options, or cached build artifacts.

Explore this section#

Build a network

Connect event-driven communication to COBA and CUBA network examples.

Build an event-driven E/I network
Compile a native kernel

Load C++ or CUDA source and call the resulting kernel from JAX.

Compile a raw CUDA/C++ kernel