9#ifndef FORTRAN_RUNTIME_CUDA_MEMORY_H_
10#define FORTRAN_RUNTIME_CUDA_MEMORY_H_
12#include "flang/Runtime/descriptor-consts.h"
13#include "flang/Runtime/entry-names.h"
16namespace Fortran::runtime::cuda {
21void *RTDECL(CUFMemAlloc)(std::size_t bytes,
unsigned type,
22 const char *sourceFile =
nullptr,
int sourceLine = 0);
25void RTDECL(CUFMemFree)(
void *devicePtr,
unsigned type,
26 const char *sourceFile =
nullptr,
int sourceLine = 0);
31void RTDECL(CUFMemsetDescriptor)(Descriptor *desc,
void *value,
32 const char *sourceFile =
nullptr,
int sourceLine = 0);
35void RTDECL(CUFDataTransferPtrPtr)(
void *dst,
void *src, std::size_t bytes,
36 unsigned mode,
const char *sourceFile =
nullptr,
int sourceLine = 0);
39void RTDECL(CUFDataTransferPtrDesc)(
void *dst, Descriptor *src,
40 std::size_t bytes,
unsigned mode,
const char *sourceFile =
nullptr,
44void RTDECL(CUFDataTransferDescDesc)(Descriptor *dst, Descriptor *src,
45 unsigned mode,
const char *sourceFile =
nullptr,
int sourceLine = 0);
48void RTDECL(CUFDataTransferCstDesc)(Descriptor *dst, Descriptor *src,
49 unsigned mode,
const char *sourceFile =
nullptr,
int sourceLine = 0);
52void RTDECL(CUFDataTransferDescDescNoRealloc)(Descriptor *dst, Descriptor *src,
53 unsigned mode,
const char *sourceFile =
nullptr,
int sourceLine = 0);
56void RTDECL(CUFDataTransferGlobalDescDesc)(Descriptor *dst, Descriptor *src,
57 unsigned mode,
const char *sourceFile =
nullptr,
int sourceLine = 0);