Architectures

Aether.Architectures.CPUType
struct CPU <: Aether.Architectures.AbstractArchitecture
CPU()

The host architecture.

using Aether

CPU()

# output
CPU()
source
Aether.Architectures.GPUType
struct GPU{B<:KernelAbstractions.GPU} <: Aether.Architectures.AbstractArchitecture
GPU(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.

source
Aether.Architectures.on_architectureFunction
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.0
source
Aether.Architectures.synchronizeFunction
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.

source