Expand description
Cache-optimized map, reduce, and elementwise kernels.
Modules§
- view
- Julia-like dynamic-rank strided view types.
Structs§
- Adjoint
- Adjoint operation: f(x) = adjoint(x) = conj(transpose(x)) For scalar numbers, this is conj.
- Conj
- Complex conjugate operation: f(x) = conj(x)
- Copy
Plan - A compiled copy traversal for one
(dims, dst_strides, src_strides)layout pair. - Fused
Inst - One SSA instruction in a
FusedPlan. - Fused
Plan - Topologically ordered fused elementwise SSA DAG.
- Identity
- Identity operation: f(x) = x
- RawStrided
Mut - Borrowed raw strided output layout.
- RawStrided
Ref - Borrowed raw strided input layout.
- Strided
Array - Owned strided multidimensional array.
- Strided
View - Dynamic-rank immutable strided view with lazy element operations.
- Strided
View Mut - Dynamic-rank mutable strided view.
- Transpose
- Transpose operation: f(x) = transpose(x) For scalar numbers, this is identity. For matrix elements, this would transpose each element.
Enums§
- FusedOp
- Runtime scalar operation for a fused elementwise plan.
- Strided
Error - Errors that can occur during strided array operations.
Constants§
- BLOCK_
MEMORY_ SIZE - Block memory size for cache-optimized iteration (L1 cache target).
- CACHE_
LINE_ SIZE - Cache line size in bytes.
- RAW_
FUSED_ RANK_ LIMIT - Maximum rank fused on the stack before falling back to the view kernels.
Traits§
- Composable
Element Op - Trait for element operations that support type-level composition.
- Compose
- Helper trait for composing two ElementOp types.
- Element
Op - Trait for element-wise operations applied to strided views.
- Element
OpApply - Trait for types that support element operations (conj, transpose, adjoint).
- Fused
Scalar - Scalar types supported by
fused_elementwise_into. - Maybe
Send - Equivalent to
Sendwhenparallelis enabled; blanket-impl otherwise. - Maybe
Send Sync - Equivalent to
Send+Syncwhenparallelis enabled; blanket-impl otherwise. - Maybe
Simd Ops - Trait for types that may have SIMD-accelerated sum/dot operations.
- Maybe
Sync - Equivalent to
Syncwhenparallelis enabled; blanket-impl otherwise.
Functions§
- add
- Element-wise addition:
dest[i] += src[i]. - axpy
- AXPY:
dest[i] = alpha * src[i] + dest[i]. - axpy_
conj_ raw dest = alpha * conj(src) + destover borrowed raw strided layouts.- axpy_
raw dest = alpha * src + destover borrowed raw strided layouts.- batched_
outer_ product_ into - Compute
dest[lhs_free..., rhs_free..., batch...] = lhs[lhs_free..., batch...] * rhs[rhs_free..., batch...]. - broadcast_
mul_ into - Broadcasted element-wise multiplication:
dest[i] = a[i] * b[i]. - col_
major_ strides - Compute column-major strides (Julia default: first index varies fastest).
- copy_
conj - Copy with complex conjugation:
dest[i] = conj(src[i]). - copy_
into - Copy elements from source to destination:
dest[i] = src[i]. - copy_
into_ col_ major - Copy elements from
srctodst, optimized for col-major destination. - copy_
scale - Copy with scaling:
dest[i] = scale * src[i]. - copy_
scale_ conj_ raw dest = scale * conj(src)over borrowed raw strided layouts.- copy_
scale_ raw dest = scale * srcover borrowed raw strided layouts.- copy_
transpose_ scale_ into - Copy with transpose and scaling:
dest[j,i] = scale * src[i,j]. - dot
- Dot product:
sum(OpA::apply(a[i]) * OpB::apply(b[i])). - fma
- Fused multiply-add:
dest[i] += OpA::apply(a[i]) * OpB::apply(b[i]). - fused_
elementwise_ into - Evaluate a runtime-DAG elementwise plan into one or more destinations.
- map_
into - Apply a function element-wise from source to destination.
- mul
- Element-wise multiplication:
dest[i] *= src[i]. - mul_
into - Element-wise multiplication:
dest[i] = a[i] * b[i]. - reduce
- Full reduction with map function:
reduce(init, op, map.(src)). - reduce_
axis - Reduce along a single axis, returning a new StridedArray.
- row_
major_ strides - Compute row-major strides (C default: last index varies fastest).
- sum
- Sum all elements:
sum(src). - symmetrize_
conj_ into - Conjugate-symmetrize a square matrix:
dest = (src + conj(src^T)) / 2. - symmetrize_
into - Symmetrize a square matrix:
dest = (src + src^T) / 2. - zip_
map2_ into - Binary element-wise operation:
dest[i] = f(a[i], b[i]). - zip_
map3_ into - Ternary element-wise operation:
dest[i] = f(a[i], b[i], c[i]). - zip_
map4_ into - Quaternary element-wise operation:
dest[i] = f(a[i], b[i], c[i], e[i]).
Type Aliases§
- Result
- Result type for strided array operations.