Open lethean1 opened 2 years ago
for example, as follows:
// mlir array type
template <typename Elem, size_t Rank> struct MemRef {
Elem *allocatedPtr;
Elem *alignedPtr;
int32_t offset;
std::array<int32_t, Rank> sizes;
std::array<int32_t, Rank> strides;
};
typedef MemRef<ElementType, 1> MemRefType1D;
typedef MemRef<ElementType, 2> MemRefType2D;
typedef MemRef<ElementType, 3> MemRefType3D;
Edit: Deleted the index operators since they are only there for convenience,
I got it. Thank you!
I saw that I should call
void _mlir_ciface_laplace(MemRefType3D *input, MemRefType3D *output);
in my main.c, but I wonder how can I build a MemRefType3D* type argument in C file?