API reference

This is the official API reference of CellArrays. Note that it can also be queried interactively from the Julia REPL using the help mode:

julia> using CellArrays
julia>?
help?> CellArrays

CellArray type and basic constructors

CellArrays.CellArrayType
CellArray{T<:Cell,N,B,T_array} <: AbstractArray{T,N} where Cell <: Union{Number, SArray, FieldArray}

N-dimensional array with elements of type T, where T are Cells of type Number, SArray or FieldArray. B defines the blocklength, which refers to the amount of values of a same Cell field that are stored contigously (B=1 means array of struct like storage; B=prod(dims) means array struct of array like storage; B=0 is an alias for B=prod(dims), enabling better peformance thanks to more specialized dispatch). T_array defines the array type used for storage.


CellArray{T,N,B}(T_arraykind, undef, dims)
CellArray{T,B}(T_arraykind, undef, dims)
CellArray{T}(T_arraykind, undef, dims)

Construct an uninitialized N-dimensional CellArray containing Cells of type T which are stored in an array of kind T_arraykind.

Performance note

Best performance on GPUs is in general obtained with B=0 as set by default. B=1 migth give better performance in certain cases. Other values of B do with the current implementation not lead to optimal performance on GPU.

See also: CPUCellArray, CuCellArray, ROCCellArray

source

Convenience type aliases and constructors

Index

Documentation

CellArrays.CPUCellArrayType
CPUCellArray{T<:Cell,N,B,T_elem} <: AbstractArray{T,N} where Cell <: Union{Number, SArray, FieldArray}

N-dimensional CellArray with cells of type T, blocklength B, and T_array being an Array of element type T_elem: alias for CellArray{T,N,B,Array{T_elem,CellArrays._N}}.


CPUCellArray{T,B}(undef, dims)
CPUCellArray{T}(undef, dims)

Construct an uninitialized N-dimensional CellArray containing Cells of type T which are stored in an array of kind Array.

See also: CellArray, CuCellArray, ROCCellArray

source

Functions – additional to standard AbstractArray functionality

Index

Documentation

CellArrays.cellsizeMethod
cellsize(A)
cellsize(A, dim)

Return a tuple containing the dimensions of A or return only a specific dimension, specified by dim.

source
CellArrays.fieldMethod
field(A, indices)

Return an array view of the field of CellArray A designated with indices (modifying the view will modify A). The view's dimensionality and size are equal to A's. The operation is not supported if parameter B of A is neither 0 nor 1.

Arguments

  • indices::Int|NTuple{N,Int}: the indices that designate the field in accordance with A's cell type.
source