NeoN
A framework for CFD software
Loading...
Searching...
No Matches
kokkos.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 - 2026 NeoN authors
2//
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
7
8#include <Kokkos_Core.hpp>
9
12
13namespace NeoN
14{
15
20{
21
22public:
23
24 using GPUMemSpace = Kokkos::DefaultExecutionSpace::memory_space;
25 using CPUMemSpace = Kokkos::HostSpace;
26
27 void* alloc(sizeType size) override;
28
29 void* realloc(void* ptr, sizeType size) override;
30
31 void free(void* ptr) override;
32
33 ~KokkosAllocator() override {}
34};
35
37
38}
Kokkos::DefaultExecutionSpace::memory_space GPUMemSpace
Definition kokkos.hpp:24
void free(void *ptr) override
free a block of size bytes
void * realloc(void *ptr, sizeType size) override
reallocate a block of size bytes
void * alloc(sizeType size) override
allocate a block of size bytes
Kokkos::HostSpace CPUMemSpace
Definition kokkos.hpp:25
~KokkosAllocator() override
Definition kokkos.hpp:33
Integer types used throughout NeoN.
Definition array.hpp:18
KokkosAllocator DefaultAllocator
Definition kokkos.hpp:36
std::size_t sizeType
Definition label.hpp:56