FLANG
FIROpenACCTypeInterfaces.h
1//===- FIROpenACCTypeInterfaces.h -------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains external dialect interfaces for FIR.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef FLANG_OPTIMIZER_OPENACC_FIROPENACCTYPEINTERFACES_H_
14#define FLANG_OPTIMIZER_OPENACC_FIROPENACCTYPEINTERFACES_H_
15
16#include "flang/Optimizer/Dialect/FIRType.h"
17#include "mlir/Dialect/OpenACC/OpenACC.h"
18
19namespace fir::acc {
20
21template <typename T>
23 : public mlir::acc::MappableType::ExternalModel<OpenACCMappableModel<T>,
24 T> {
25 mlir::TypedValue<mlir::acc::PointerLikeType> getVarPtr(::mlir::Type type,
26 mlir::Value var) const;
27
28 std::optional<llvm::TypeSize>
29 getSizeInBytes(mlir::Type type, mlir::Value var, mlir::ValueRange accBounds,
30 const mlir::DataLayout &dataLayout) const;
31
32 std::optional<int64_t>
33 getOffsetInBytes(mlir::Type type, mlir::Value var, mlir::ValueRange accBounds,
34 const mlir::DataLayout &dataLayout) const;
35
37 generateAccBounds(mlir::Type type, mlir::Value var,
38 mlir::OpBuilder &builder) const;
39};
40
41} // namespace fir::acc
42
43#endif // FLANG_OPTIMIZER_OPENACC_FIROPENACCTYPEINTERFACES_H_
Definition: OpenACC.h:20
Definition: FIROpenACCTypeInterfaces.h:24