-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Description
I am trying to compile a simple gather function using vectors for data storage using the compilation flag
cgeist $1 -O0 -g -fopenmp -S -o $fileBase.affine.mlir -I/usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11 \
-I/usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/x86_64-linux-gnu/c++/11 \
-I/usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/backward \
-I/home/$USER_NAME/$PROJECT_NAME/build/lib/clang/18/include \
-I/usr/local/include \
-I/usr/include -D$4
The function that I'm trying to compile is
#include <iostream>
#include <vector>
#pragma scop
void gather_vec(std::vector<int> &a,
std::vector<int> &b,
std::vector<int> &idx) {
for (size_t i = 0; i < idx.size(); ++i) {
a[i] = b[idx[i]];
}
}
int main() {
std::vector<int> a;
std::vector<int> b = {1, 2, 3, 4};
std::vector<int> idx = {3, 2, 1, 0};
gather_vec(a, b, idx);
// verification
for (size_t i = 0; i < a.size(); ++i) {
std::cout << "a[" << i << "] = " << a[i] << "\n";
}
return 0;
}
and when I run the cgeist command, I get some cleanup not handled and this error before printing out the intermediate MLIR. I have also attached the whole log.
Metadata
Metadata
Assignees
Labels
No labels