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

Initialize target library with only a target data #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Initialize target library with only a target data #19

wants to merge 1 commit into from

Conversation

hahnjo
Copy link
Contributor

@hahnjo hahnjo commented Jul 15, 2015

This corner case may occur in benchmarks that want to measure data movement.

I didn't know how to implement a test case for the global initializer, but I could verify with a simple program:

int main(int argc, char* argv[])
{
        int a = 0;
        #pragma omp target data map(a)
        {
        }

        return 0;
}

This corner case may occur in benchmarks that want to measure data movement.
@sfantao
Copy link

sfantao commented Jul 28, 2015

Hi hahnjo,

Thanks for the patch! However, I don't think we should do a registration for this case. Avoiding a registrations is something we should always do, as long as we provide the right functionality. If a user is interested in measuring data movements he should do something like:

int a;
#pragma omp target data map(alloc:a)
{
  // start timer
  #pragma omp target update to(a)
  // stop timer

  #pragma omp target 
  {} 
}

Regards,
Samuel

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