FLANG
allocator.h
1//===-- include/flang/Runtime/CUDA/allocator.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_ALLOCATOR_H_
10#define FORTRAN_RUNTIME_CUDA_ALLOCATOR_H_
11
12#include "common.h"
13#include "flang/Runtime/descriptor-consts.h"
14#include "flang/Runtime/entry-names.h"
15
16namespace Fortran::runtime::cuda {
17
18extern "C" {
19
20void RTDECL(CUFRegisterAllocator)();
21}
22
23void *CUFAllocPinned(std::size_t);
24void CUFFreePinned(void *);
25
26void *CUFAllocDevice(std::size_t);
27void CUFFreeDevice(void *);
28
29void *CUFAllocManaged(std::size_t);
30void CUFFreeManaged(void *);
31
32void *CUFAllocUnified(std::size_t);
33void CUFFreeUnified(void *);
34
35} // namespace Fortran::runtime::cuda
36#endif // FORTRAN_RUNTIME_CUDA_ALLOCATOR_H_