mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-21 21:31:23 +01:00
24 lines
367 B
C++
24 lines
367 B
C++
/*
|
|
* @@name: declare_target.2b_main
|
|
* @@type: C++
|
|
* @@compilable: yes
|
|
* @@linkable: no
|
|
* @@expect: failure
|
|
* @@version: omp_5.1
|
|
*/
|
|
#include <iostream>
|
|
using namespace std;
|
|
|
|
#include "classes.hpp"
|
|
|
|
int main (){
|
|
|
|
XOR1 my_XOR1(3);
|
|
int res1;
|
|
|
|
#pragma omp target map(from: res1)
|
|
res1=my_XOR1.foo();
|
|
|
|
cout << res1 << endl; // OUT1: 2
|
|
}
|