picceler
Loading...
Searching...
No Matches
image_access_helper.h
Go to the documentation of this file.
1#pragma once
2
3#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
4#include "mlir/IR/Builders.h"
5#include "mlir/IR/Location.h"
6#include "mlir/IR/Value.h"
7
8namespace picceler {
9
21 mlir::Value structPtr; // !llvm.ptr (Opaque pointer to the Image struct)
22 mlir::OpBuilder &builder;
23 mlir::Location loc;
24
25 ImageAccessHelper(mlir::Value ptr, mlir::OpBuilder &b, mlir::Location l);
26
31 static mlir::Type getImageStructType(mlir::MLIRContext *ctx);
32
36 mlir::Value getFieldAddr(int32_t index);
37
38 mlir::Value getWidth();
39
40 mlir::Value getHeight();
41
42 mlir::Value getDataPtr();
43};
44
45} // namespace picceler
Definition ast.h:11
mlir::Value getWidth()
Definition image_access_helper.cpp:30
ImageAccessHelper(mlir::Value ptr, mlir::OpBuilder &b, mlir::Location l)
Definition image_access_helper.cpp:4
mlir::OpBuilder & builder
Definition image_access_helper.h:22
static mlir::Type getImageStructType(mlir::MLIRContext *ctx)
Definition image_access_helper.cpp:7
mlir::Value structPtr
Definition image_access_helper.h:21
mlir::Value getDataPtr()
Definition image_access_helper.cpp:40
mlir::Value getHeight()
Definition image_access_helper.cpp:35
mlir::Value getFieldAddr(int32_t index)
Definition image_access_helper.cpp:13
mlir::Location loc
Definition image_access_helper.h:23