0

I'm trying to execute Quick Sort algorithm on GPU using OpenCL. I found a package developed by Intel titled "GPU-Quicksort in OpenCL 2.0: Nested Parallelism and Work-Group Scan Functions".

However this code is developed to run on windows machine and not on ubuntu.

Post executing it on Ubuntu I found there are specific header files used in the code which support only windows and not Ubuntu.

I tried few fixes available on the internet and stackoverflow and could solve only a few.

Few others that still remain unsolved are with the keywords "QueryperformanceFrequency" and "QueryperformanceCounter".

I referred to linux alternatives to record time and the frequency, unfortunately these too didn't work.

Link to the working repository is included in the above title with hyperlink.

I'm running the code with version 1.2 on a NVIDIA Gpu.

The errors I get post execution are as below:

‘QueryPerformanceFrequency’ was not declared in this scope ‘QueryPerformanceCounter’ was not declared in this scope

I look forward to your assistance in solving this issue.

Thank You.

Community
  • 1
  • 1
  • "Query..." are WIndows functions. For variations of Linux, use [clock_gettime](https://linux.die.net/man/3/clock_gettime). – rcgldr Jun 14 '19 at 01:45

1 Answers1

0

You can use std::chrono::high_resolution_clock from chrono that's available since c++11, and you'll be writing platform-agnostic code.

Caveat for VS2012: it uses system_clock for the high resolution which has terrible precision. If you are using a more recent version of VS or any other platform you should be good to go.

AlexG
  • 1,091
  • 7
  • 15