FLANG
allocatable.h
1//===-- include/flang/Runtime/CUDA/allocatable.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#ifndef FORTRAN_RUNTIME_CUDA_ALLOCATABLE_H_
10#define FORTRAN_RUNTIME_CUDA_ALLOCATABLE_H_
11
12#include "flang/Runtime/descriptor-consts.h"
13#include "flang/Runtime/entry-names.h"
14
15namespace Fortran::runtime::cuda {
16
17extern "C" {
18
20int RTDECL(CUFAllocatableAllocate)(Descriptor &, int64_t *stream = nullptr,
21 bool *pinned = nullptr, bool hasStat = false,
22 const Descriptor *errMsg = nullptr, const char *sourceFile = nullptr,
23 int sourceLine = 0);
24
27int RTDECL(CUFAllocatableAllocateSync)(Descriptor &, int64_t *stream = nullptr,
28 bool *pinned = nullptr, bool hasStat = false,
29 const Descriptor *errMsg = nullptr, const char *sourceFile = nullptr,
30 int sourceLine = 0);
31
34int RTDEF(CUFAllocatableAllocateSource)(Descriptor &alloc,
35 const Descriptor &source, int64_t *stream = nullptr, bool *pinned = nullptr,
36 bool hasStat = false, const Descriptor *errMsg = nullptr,
37 const char *sourceFile = nullptr, int sourceLine = 0);
38
41int RTDEF(CUFAllocatableAllocateSourceSync)(Descriptor &alloc,
42 const Descriptor &source, int64_t *stream = nullptr, bool *pinned = nullptr,
43 bool hasStat = false, const Descriptor *errMsg = nullptr,
44 const char *sourceFile = nullptr, int sourceLine = 0);
45
48int RTDECL(CUFAllocatableDeallocate)(Descriptor &, bool hasStat = false,
49 const Descriptor *errMsg = nullptr, const char *sourceFile = nullptr,
50 int sourceLine = 0);
51
52} // extern "C"
53
54} // namespace Fortran::runtime::cuda
55#endif // FORTRAN_RUNTIME_CUDA_ALLOCATABLE_H_