Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::CsrView< T, Index > 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 = Index
 
using CI = std::conditional_t< std::is_const_v< T >, Index const, Index >
 

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 Index = Long>
struct amrex::CsrView< T, Index >

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. Index is the type of both the column indices and the row offsets.

Member Typedef Documentation

◆ CI

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

◆ index_type

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

Member Data Documentation

◆ col_index

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

◆ mat

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

◆ nnz

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

◆ nrows

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

◆ row_offset

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

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