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

Get the environment id for a MatVarIndex #922

Open
DavidDureau opened this issue Oct 10, 2023 · 4 comments
Open

Get the environment id for a MatVarIndex #922

DavidDureau opened this issue Oct 10, 2023 · 4 comments
Assignees
Labels
arcane:accelerator Arcane Accelerator API/Runtime enhancement New feature or request

Comments

@DavidDureau
Copy link
Collaborator

In a accelerator loop, we would like to get the environment id for a given MatVarIndex:

CellToAllEnvCellAcessor c2ae(....);

command << RUNCOMMAND_ENUMERATE_CELL_ALLENVCELL(c2ae, cid, cell_group)
{
  ENUMERATE_CELL_ALLENVCELL(iev, cid, c2ae) {
    Integer env_id = envId(*iev);
    func(env_id);
  }
};

envId(MatVarIndex) could be a function, a method, or address an MaterialVariableCellInteger managed by Arcane ...

@DavidDureau DavidDureau added enhancement New feature or request arcane:accelerator Arcane Accelerator API/Runtime labels Oct 10, 2023
@grospelliergilles
Copy link
Member

grospelliergilles commented Oct 11, 2023

I have looked at this problem. I will provide a workaround for it. I will make some methods of EnvCell and AllEnvCell available on accelerator. It may not be ideal in term of performance because there is a pointer indirection to access the information but it should work.
I will do it last week of October.

@grospelliergilles grospelliergilles self-assigned this Oct 11, 2023
@grospelliergilles
Copy link
Member

A preview is available in #925

@DavidDureau
Copy link
Collaborator Author

For performance reason, I would prefer a solution with light objects like MatVarIndex, CellLocalId and a MatItemVariableScalarInViewT<Cell,Integer>.

Would it be possible?

@grospelliergilles
Copy link
Member

Yes. #925 is a temporary solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arcane:accelerator Arcane Accelerator API/Runtime enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants