FLANG
descriptor.h
1//===-- include/flang/Runtime/CUDA/descriptor.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_DESCRIPTOR_H_
10#define FORTRAN_RUNTIME_CUDA_DESCRIPTOR_H_
11
12#include "flang/Runtime/descriptor-consts.h"
13#include "flang/Runtime/entry-names.h"
14#include <cstddef>
15
16namespace Fortran::runtime::cuda {
17
18extern "C" {
19
21Descriptor *RTDECL(CUFAllocDescriptor)(
22 std::size_t, const char *sourceFile = nullptr, int sourceLine = 0);
23
25void RTDECL(CUFFreeDescriptor)(
26 Descriptor *, const char *sourceFile = nullptr, int sourceLine = 0);
27
29void *RTDECL(CUFGetDeviceAddress)(
30 void *hostPtr, const char *sourceFile = nullptr, int sourceLine = 0);
31
33void RTDECL(CUFDescriptorSync)(Descriptor *dst, const Descriptor *src,
34 const char *sourceFile = nullptr, int sourceLine = 0);
35
37void RTDECL(CUFSyncGlobalDescriptor)(
38 void *hostPtr, const char *sourceFile = nullptr, int sourceLine = 0);
39
40} // extern "C"
41
42} // namespace Fortran::runtime::cuda
43#endif // FORTRAN_RUNTIME_CUDA_DESCRIPTOR_H_