openshmem-org / specification

OpenSHMEM Application Programming Interface
http://www.openshmem.org
49 stars 32 forks source link

Need for const and pointer for shmem_team_config_t in team creation operations #445

Closed naveen-rn closed 3 years ago

naveen-rn commented 4 years ago

The current APIs for strided and 2d split team creation - have the configuration parameter as const shmem_team_config_t *. It is an input argument - so, it can be a simple shmem_team_config_t. Not sure whether we need to pass by reference these configuration parameters.

jdinan commented 4 years ago

It sounds like you are suggesting passing the struct argument by value rather than by reference? This might be fine for how the struct is currently defined, but it could become a problem in the future. There are plenty of discussions online covering pro/con of passing structs by value.

naveen-rn commented 3 years ago

Stack usage (if struct gets bigger) Performance in copying data Binary compatibility with other compilers

Though, I don't see any forseable issues. But, to be safe, if these are anticipated issues, we are thinking about - looks fine to stick with the current syntax.

jdinan commented 3 years ago

@naveen-rn Can we close this issue?

naveen-rn commented 3 years ago

We can close - the reason for the pointer type is clear.