NVIDIA / MatX

An efficient C++17 GPU numerical computing library with Python-like syntax

Home Page:https://nvidia.github.io/MatX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEA] Ones dimensionless operator

tmartin-gh opened this issue · 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();