In the document, dist_object and global_ptr use the same name u_g might be confused

Issue #385 resolved
minwei weng created an issue

I found something might be confused, at this chapter, 5 Using Global Memory with One-sided Communication ,upcxx::dist_object and upcxx::global_ptr use the same variable name u_g

Reference to the naming style about the document itself, I guess upcxx::dist_object<upcxx::global_ptr<double>> u_g(upcxx::new_array<double>(n_local)); is intended to name dobj rather than u_g

Thanks.

Comments (2)

  1. Dan Bonachea

    Hi @minwei weng - thanks for the feedback!

    To clarify, currently there is a variable called u_gptr which is a upcxx::global_ptr<double>, and u_g which is a dist_object containing a global_ptr (ie upcxx::dist_object<upcxx::global_ptr<double>>). So the names are different, but probably too similar for clarity.

    I agree the naming of the latter variable could be changed to improve the situation. We'll take this into consideration for our next revision.

  2. Log in to comment