Skip to content

possible error in omp implementation #1

Description

@Try2Code

for (int i=omp_get_thread_num(); i<N; i+=num_threads)

hi!
I think this for loop is not correct because

  • the loop counter is set to start with thread ID - I see no reason why I should write a loop like this
  • the #pragma omp parallel for is missing - this lead to version essentially being a cpu version. infact, their speed is very similar. on my machine

I am currently working on a version with GPU offloading (clang-9, gcc-8)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions