MatX icon indicating copy to clipboard operation
MatX copied to clipboard

[FEA] Ones dimensionless operator

Open tmartin-gh opened this issue 1 year ago • 0 comments

If the tensor size is known, the ones() operator should conform to it instead of requiring the user to pass in the size.

auto w = make_tensor<typename TypeParam::value_type>({test.params.nperseg});
...
(w = ones<typename TypeParam::value_type>()).run();

results in

MatX/test/00_operators/PWelch.cu(112): error: no instance of overloaded function "ones" matches the argument list
        (w = ones<typename TypeParam::value_type>()).run();

tmartin-gh avatar Sep 27 '23 16:09 tmartin-gh