SyTen

◆ DenseTensor() [3/5]

template<Rank rank, typename Scalar = SDef>
syten::DenseTensor< rank, Scalar >::DenseTensor ( Coord  dims_,
Init  do_init 
)
inline

Ctor with possibility to request calloc()-based memory allocation for the contained array.

Pass Init::No to do so, this will be disabled if Scalar is not trivial.

Parameters
dims_dimensions of each index
do_initinitialisation request: Init::Yes uses default ctors in new[], Init::No uses calloc() if Scalar or ScalarBase<Scalar> is trivial and otherwise also new[].