Tensor Operations
ElemCo.MTensorOperations — Module
MTensorOperationsUtilities for operations on tensors. This module provides wrappers around TensorOperations.jl and StridedViews.jl macros and functions.
The functions and macros are reexported by TensorTools module.
ElemCo.MTensorOperations.@mtensor — Macro
mtensor(ex)Macro for tensor operations with manual allocator.
ElemCo.MTensorOperations.@mview — Macro
@mview(ex)StridedView based version of @view.
ElemCo.MTensorOperations.mview — Method
mview(arr, args...)StridedView based version of view.
The data array is enforced to be a vector, such that the view is always a StridedView{..., Vector{...},...}.
ElemCo.MTensorOperations.mview — Method
mview(arr::StridedView, args...)StridedView based version of view, for StridedView input.
Simply calls StridedViews.sview.
Internal functions
ElemCo.MTensorOperations.replace_ref_begin_end! — Method
replace_ref_begin_end!(ex::Expr)Replace begin and end in reference expression ex with firstindex and lastindex.
This is needed for macros that generate code with begin and end in references, because those macros are expanded before the actual indices are known.