ValeevGroup / BTAS

Basic Tensor Algebra Subroutines
http://itensor.org/btas
BSD 3-Clause "New" or "Revised" License
46 stars 19 forks source link

convert scalar arguments to btas::contract and similar functions when needed to the type of the result #163

Closed evaleev closed 1 year ago

evaleev commented 1 year ago

most kernels expect type of scalars to match the types of arguments/results, thus

float* A, B, C;
btas::contract(1.0, A, {1, 2}, B, {2, 3}, 0.0, C, {1, 3});

fails to compile.

need to convert scalars to the type of result when dispatching to BLAS/LAPACK kernels