DARMA-tasking-internal / darma-frontend

Header library providing the frontend programming model for the DARMA asynchronous many-task model
Other
7 stars 0 forks source link

conflicting keyword names #91

Open jjwilke opened 6 years ago

jjwilke commented 6 years ago

Not clear why there is an output keyword for access_handle_collection. Consider renaming to avoid conflicts with collectives.

/Users/jjwilke/Programs/darma-examples/apps/ljp_dynamics/timers.h:63:34: error: reference to 'output' is ambiguous
  bools.template reduce<BoolAnd>(output=sync_token);
                                 ^
/Users/jjwilke/Programs/install/darma-frontend/include/darma/interface/app/keyword_arguments/output.h:60:36: note: candidate
      found by name lookup is 'darma_runtime::keyword_arguments_for_access_handle_collection::(anonymous namespace)::output'
    AliasDarmaKeyword(collectives, output);
                                   ^
/Users/jjwilke/Programs/install/darma-frontend/include/darma/interface/app/keyword_arguments/output.h:50:49: note: candidate
      found by name lookup is 'darma_runtime::keyword_arguments_for_collectives::(anonymous namespace)::output'
DeclareDarmaTypeTransparentKeyword(collectives, output);
dhollman commented 6 years ago

A lot of keyword arguments are aliased into multiple namespaces. The recommended style is no longer to use something like using namespace darma::keyword_arguments_for_collectives; instead, you should either specifically use using darma::keyword_arguments_forcollectives::output or use one of the prefixed/suffixed namespaces. For instance,

using namespace darma::_keyword_arguments; // includes _output, among others / ... / bools.template reduce(_output=sync_token);

I think this is much more sustainable, don’t you?

Thanks,

David

On April 27, 2018 at 10:00:58 AM, Jeremy (notifications@github.commailto:notifications@github.com) wrote:

Not clear why there is an output keyword for access_handle_collection. Consider renaming to avoid conflicts with collectives.

/Users/jjwilke/Programs/darma-examples/apps/ljp_dynamics/timers.h:63:34: error: reference to 'output' is ambiguous bools.template reduce(output=sync_token); ^ /Users/jjwilke/Programs/install/darma-frontend/include/darma/interface/app/keyword_arguments/output.h:60:36: note: candidate found by name lookup is 'darma_runtime::keyword_arguments_for_access_handle_collection::(anonymous namespace)::output' AliasDarmaKeyword(collectives, output); ^ /Users/jjwilke/Programs/install/darma-frontend/include/darma/interface/app/keyword_arguments/output.h:50:49: note: candidate found by name lookup is 'darma_runtime::keyword_arguments_for_collectives::(anonymous namespace)::output' DeclareDarmaTypeTransparentKeyword(collectives, output);

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/DARMA-tasking/darma-frontend/issues/91, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAGIHliuc--14TVUeQ_7-vQDqZdM9W7Bks5ts07HgaJpZM4Tqth3.