#include #include "test_functions.h" #pragma acc routine void utils::helper_function_1(); #pragma acc routine void utils::helper_function_2(); class TestExecutable { public: TestExecutable(); ~TestExecutable(); void do_something(); }; TestExecutable::TestExecutable() { #pragma acc enter data copyin(this) } TestExecutable::~TestExecutable() { #pragma acc exit data delete(this) } #pragma acc routine seq void TestExecutable::do_something() { utils::helper_function_1(); utils::helper_function_2(); } int main() { TestExecutable test_executable; test_executable; #pragma acc parallel { test_executable.do_something(); } return 0; }