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

Integers with Tensor::operator() #24

Open
fredrikbk opened this issue Mar 6, 2017 · 0 comments
Open

Integers with Tensor::operator() #24

fredrikbk opened this issue Mar 6, 2017 · 0 comments

Comments

@fredrikbk
Copy link
Contributor

fredrikbk commented Mar 6, 2017

We would be able to use integers to index into Tensor::operator(). Ideally A(0,1) reads coordinate (0,1) and A(0,i) is an index expression that holds the first dimension fixed. (This might not work out; needs to be explored.)

So in addition to writing index expressions you can also use integers (and eventually a mix):

IndexVar i, j;
A(i,j) = B(i,j); // Index expression
A(0,1) = 1;      // Insertion
A(0,i);          // Read the first row?
rohany added a commit that referenced this issue Oct 2, 2021
*: support distribution onto multiple similarly distributed tensors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant