DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
ArrayAdjacency_DeviceView.hpp
Go to the documentation of this file.
1#pragma once
2/// @file ArrayAdjacency_DeviceView.hpp
3/// @brief Device-callable view type for @ref DNDS::ArrayAdjacency "ArrayAdjacency". Mirrors the host
4/// `operator[]` returning an @ref DNDS::AdjacencyRow "AdjacencyRow", but with `__device__` methods.
5
6#include "AdjacencyRow.hpp"
7#include "../DeviceView.hpp"
8#include "DNDS/Defines.hpp"
10
11namespace DNDS
12{
13 /**
14 * @brief Device-callable adjacency view: extends @ref DNDS::ArrayDeviceView "ArrayDeviceView" so that
15 * indexing into a row returns an @ref DNDS::AdjacencyRow "AdjacencyRow" of indices.
16 *
17 * @tparam B Target device backend.
18 * @tparam index_T `DNDS::index` or `const DNDS::index`.
19 * @tparam _row_size / _row_max / _align Same meaning as in @ref DNDS::Array "Array".
20 */
21 template <DeviceBackend B, typename index_T, rowsize _row_size = 1, rowsize _row_max = _row_size, rowsize _align = NoAlign>
46}
Non-owning row view for adjacency arrays.
Core type aliases, constants, and metaprogramming utilities for the DNDS framework.
#define DNDS_DEVICE_TRIVIAL_COPY_DEFINE(T, T_Self)
Definition Defines.hpp:83
#define DNDS_DEVICE_CALLABLE
Definition Defines.hpp:76
Device memory abstraction layer with backend-specific storage and factory creation.
Non-owning span (pointer, size) into an ArrayAdjacency row.
Device-callable adjacency view: extends ArrayDeviceView so that indexing into a row returns an Adjace...
DNDS_DEVICE_CALLABLE index_T * rowPtr(index i)
DNDS_DEVICE_CALLABLE AdjacencyRow< const index_T > operator[](index i) const
DNDS_DEVICE_CALLABLE AdjacencyRow< index_T > operator[](index i)
Non-owning device-callable view of an Array, specialised per DeviceBackend.
T * operator[](index iRow)
Raw row pointer. iRow == Size() is allowed for past-the-end queries (useful for computing buffer end ...
DNDS_DEVICE_CALLABLE rowsize RowSize() const
Uniform row width for fixed layouts (asserts otherwise).
the host side operators are provided as implemented
int64_t index
Global row / DOF index type (signed 64-bit; handles multi-billion-cell meshes).
Definition Defines.hpp:107