Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

literal construction APIs #37

Open
lgarithm opened this issue Jul 1, 2019 · 0 comments
Open

literal construction APIs #37

lgarithm opened this issue Jul 1, 2019 · 0 comments

Comments

@lgarithm
Copy link
Collaborator

lgarithm commented Jul 1, 2019

e.g.

namespace ttl
{
template <typename R> ttl::tensor<R, 0> scalar(const R &x)
{
    ttl::tensor<R, 0> t;
    t.data()[0] = x;
    return t;
}
}  // namespace ttl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant