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 = -1,
21 bool hasStat = false, const Descriptor *errMsg = nullptr,
22 const char *sourceFile = nullptr, int sourceLine = 0);
23
26int RTDECL(CUFAllocatableAllocateSync)(Descriptor &, int64_t stream = -1,
27 bool hasStat = false, const Descriptor *errMsg = nullptr,
28 const char *sourceFile = nullptr, int sourceLine = 0);
29
32int RTDEF(CUFAllocatableAllocateSource)(Descriptor &alloc,
33 const Descriptor &source, int64_t stream = -1, bool hasStat = false,
34 const Descriptor *errMsg = nullptr, const char *sourceFile = nullptr,
35 int sourceLine = 0);
36
39int RTDEF(CUFAllocatableAllocateSourceSync)(Descriptor &alloc,
40 const Descriptor &source, int64_t stream = -1, bool hasStat = false,
41 const Descriptor *errMsg = nullptr, const char *sourceFile = nullptr,
42 int sourceLine = 0);
43
46int RTDECL(CUFAllocatableDeallocate)(Descriptor &, bool hasStat = false,
47 const Descriptor *errMsg = nullptr, const char *sourceFile = nullptr,
48 int sourceLine = 0);
49
50} // extern "C"
51
52} // namespace Fortran::runtime::cuda
53#endif // FORTRAN_RUNTIME_CUDA_ALLOCATABLE_H_