Skip to content
Wei, Jimmy T edited this page Mar 10, 2023 · 1 revision

What is the dpc_common.hpp file

The dpc_common.hpp includes some common utilities that simplify samples.​

  • The header-file location is: ​
    • /dev-utilities//include​
  • This path is set up by default via setvars.sh​
  • To include the common header you add: ... // Location of file: /dev-utilities//include​

include "dpc_common.hpp"

  • Utilities
    • TimeInterval
#include <iostream>​
// Location of file: <oneapi-root>/dev-utilities/<version>/include​
#include <dpc_common.hpp>​
 
int main()​
{​
    dpc_common::TimeInterval t;​
    // <Computation to measure>​
    double elapsed_time = t.Elapsed();​
    std::cout << "time: " << elapsed_time << "s\n";​
}
Clone this wiki locally