You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use OMP pragmas in a cpp file, it always reports an error:
error: use of undeclared identifier 'pragma_single_line_one_argument' pragma_single_line_one_argument("omp", "for");
^
1 error generated.
Error in compilation
Here is the source file(main.cpp) I've tried with Bambu:
#include <stdio.h>
#include <omp.h>
#define N 100
void copy(int *a, int *b) {
int i;
#pragma omp parallel for
for(i = 0; i < N; i++) {
b[i] = a[i];
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Does Bambu only support OpenMP with C file?
If I use OMP pragmas in a cpp file, it always reports an error:
error: use of undeclared identifier 'pragma_single_line_one_argument'
pragma_single_line_one_argument("omp", "for");
^
1 error generated.
Error in compilation
Here is the source file(main.cpp) I've tried with Bambu:
#include <stdio.h>
#include <omp.h>
#define N 100
void copy(int *a, int *b) {
int i;
#pragma omp parallel for
for(i = 0; i < N; i++) {
b[i] = a[i];
}
}
The command I've use is:
bambu main.cpp --top-fname=copy -fno-delete-null-pointer-checks --mem-delay-read=20 --mem-delay-write=20 --channels-type=MEM_ACC_11 --memory-allocation-policy=NO_BRAM --experimental-set=BAMBU --no-iob --num-accelerators=2 --memory-banks-number=4 --channels-number=2 --context_switch=2 --compiler=I386_CLANG10 -fopenmp -p -v 5
Beta Was this translation helpful? Give feedback.
All reactions