Architectures
Aether.Architectures.CPU — Type
struct CPU <: Aether.Architectures.AbstractArchitectureCPU()The host architecture.
using Aether
CPU()
# output
CPU()Aether.Architectures.GPU — Type
struct GPU{B<:KernelAbstractions.GPU} <: Aether.Architectures.AbstractArchitectureGPU(backend)A GPU architecture wrapping a KernelAbstractions GPU backend instance supplied by the user, e.g. GPU(CUDABackend()) with CUDA.jl loaded. src/ names no vendor package; the corresponding backend package only has to be loaded.
Aether.Architectures.on_architecture — Function
on_architecture(
architecture::Aether.Architectures.AbstractArchitecture,
a::AbstractArray
) -> Any
Move a to the memory space of architecture. An array already on the target architecture is returned as-is, not copied. This is the only sanctioned way to move data between host and device.
using Aether
on_architecture(CPU(), [1.0, 2.0])
# output
2-element Vector{Float64}:
1.0
2.0Aether.Architectures.synchronize — Function
synchronize(
architecture::Aether.Architectures.AbstractArchitecture
)
Block until all outstanding kernel launches and data transfers on architecture have completed. Kernel launches through launch! and for_each! are asynchronous on GPUs; call this before timing or before reading results on the host. On CPU() it is effectively a no-op.