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

Make integral index type a compile time choice #202

Open
PDoakORNL opened this issue Jun 3, 2020 · 1 comment
Open

Make integral index type a compile time choice #202

PDoakORNL opened this issue Jun 3, 2020 · 1 comment
Assignees

Comments

@PDoakORNL
Copy link
Contributor

With distG4 and the need to support linear indexing into large tensors int is not always going to cut it as a type. Make this a compile time choice i.e. template parameter, type alias etc. so this is the last time its an issue. Do this in such a way that we use the compiler to protect us from the possibility of a runtime overflow.

@PDoakORNL PDoakORNL self-assigned this Jun 3, 2020
@gbalduzz
Copy link
Contributor

gbalduzz commented Jun 8, 2020

why not just use std::size_t (uint64) for function's size? There should not be any performance penalty. We can not worry too much for integer loop variables inside kernels as no single dimension is ever larger than 2^31-1. Loops over the linear index can be problematic tough.

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

2 participants