Skip to content

contexts: parallel, transport and overall#7

Open
boeschf wants to merge 3 commits intomasterfrom
initialization
Open

contexts: parallel, transport and overall#7
boeschf wants to merge 3 commits intomasterfrom
initialization

Conversation

@boeschf
Copy link
Owner

@boeschf boeschf commented Dec 4, 2019

No description provided.


gridtools::ghex::tl::context<gridtools::ghex::tl::mpi_tag> context(1,MPI_COMM_WORLD);

auto token = context.get_token();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto token = context.get_token();
auto token = context.get_token();
EXPECT_TRUE(token == 0);

??

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still need to write proper tests

#include <mutex>
#include <atomic>

namespace gridtools {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this and not using just std facilities?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see below

boost::callable_traits::return_type_t<F>>::type;

#ifndef GHEX_THREAD_SINGLE
struct context
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know if context is the right name here, maybe primitives is a better choice. Are we assuming there may be more types of primitives around, like non-busy-waiting, hpx, omp, etc..?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the name change. I guess there will be different primitives around, so I will change the name to atomic_primitives

class parallel_context
{
public: // members
using thread_context_type = ::gridtools::ghex::threads::context;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to make this a template parameter? I will then be responsibility of the configs to set the proper combination of factors

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template parameter makes sense

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

Successfully merging this pull request may close these issues.

2 participants