Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::CsrView< T, I > Struct Template Reference

Lightweight non-owning CSR view that can point to host or device buffers. More...

#include <AMReX_CSR.H>

Public Types

using index_type = I
 
using CI = std::conditional_t< std::is_const_v< T >, I const, I >
 

Public Attributes

T *__restrict__ mat = nullptr
 
CI *__restrict__ col_index = nullptr
 
CI *__restrict__ row_offset = nullptr
 
Long nnz = 0
 
Long nrows = 0
 

Detailed Description

template<typename T, typename I = Long>
struct amrex::CsrView< T, I >

Lightweight non-owning CSR view that can point to host or device buffers.

The template parameter T controls constness of the value array; the column/row arrays follow suit. I is the type of both the column indices and the row offsets.

Member Typedef Documentation

◆ CI

template<typename T , typename I = Long>
using amrex::CsrView< T, I >::CI = std::conditional_t<std::is_const_v<T>, I const, I>

◆ index_type

template<typename T , typename I = Long>
using amrex::CsrView< T, I >::index_type = I

Member Data Documentation

◆ col_index

template<typename T , typename I = Long>
CI* __restrict__ amrex::CsrView< T, I >::col_index = nullptr

◆ mat

template<typename T , typename I = Long>
T* __restrict__ amrex::CsrView< T, I >::mat = nullptr

◆ nnz

template<typename T , typename I = Long>
Long amrex::CsrView< T, I >::nnz = 0

◆ nrows

template<typename T , typename I = Long>
Long amrex::CsrView< T, I >::nrows = 0

◆ row_offset

template<typename T , typename I = Long>
CI* __restrict__ amrex::CsrView< T, I >::row_offset = nullptr

The documentation for this struct was generated from the following file: