CUSP
Loading...
Searching...
No Matches
Array Views

Basic 1D and 2D containers that wrap existing data or iterators. More...

Classes

class  cusp::array1d_view< RandomAccessIterator >
 The array1d_view class is a 1D vector container that wraps data from various iterators in a array1d datatype. More...
 
class  cusp::counting_array< ValueType >
 Specialized array1d_view wrapping thrust::counting_iterator. More...
 
class  cusp::constant_array< ValueType >
 Specialized array1d_view wrapping thrust::constant_iterator. More...
 
class  cusp::random_array< ValueType >
 Specialized array1d_view wrapping cusp::random_iterator. More...
 
class  cusp::array2d_view< ArrayView, Orientation >
 The array2d_view is a view of a array2d container. More...
 

Functions

template<typename Iterator >
array1d_view< Iterator > cusp::make_array1d_view (Iterator first, Iterator last)
 
template<typename T , typename MemorySpace >
array1d< T, MemorySpace >::view cusp::make_array1d_view (array1d< T, MemorySpace > &v)
 
template<typename Iterator >
array1d_view< Iterator >::view cusp::make_array1d_view (array1d_view< Iterator > &v)
 
template<typename Iterator >
array1d_view< Iterator >::view cusp::make_array1d_view (const array1d_view< Iterator > &v)
 
template<typename T , typename MemorySpace >
array1d< T, MemorySpace >::const_view cusp::make_array1d_view (const array1d< T, MemorySpace > &v)
 
template<typename Iterator , typename Orientation >
array2d_view< typename cusp::array1d_view< Iterator >, Orientation > cusp::make_array2d_view (size_t num_rows, size_t num_cols, size_t pitch, const cusp::array1d_view< Iterator > &values, Orientation)
 
template<typename Array , typename Orientation >
array2d_view< Array, Orientation > cusp::make_array2d_view (const array2d_view< Array, Orientation > &v)
 
template<typename T , class MemorySpace , class Orientation >
array2d_view< typename cusp::array1d_view< typename cusp::array1d< T, MemorySpace >::iterator >, Orientation > cusp::make_array2d_view (cusp::array2d< T, MemorySpace, Orientation > &v)
 
template<typename T , class MemorySpace , class Orientation >
array2d_view< typename cusp::array1d_view< typename cusp::array1d< T, MemorySpace >::const_iterator >, Orientation > cusp::make_array2d_view (const cusp::array2d< T, MemorySpace, Orientation > &v)
 

Detailed Description

Basic 1D and 2D containers that wrap existing data or iterators.

Function Documentation

◆ make_array1d_view() [1/5]

template<typename T , typename MemorySpace >
array1d< T, MemorySpace >::view cusp::make_array1d_view ( array1d< T, MemorySpace > &  v)

This is a convenience function for generating an array1d_view using an array1d

Template Parameters
Tvalue_type of the array
MemorySpacememory space of the array (cusp::host_memory or cusp::device_memory)
Parameters
vThe array1d used to construct array1d_view
Returns
array1d_view constructed using input array1d

Definition at line 711 of file array1d.h.

◆ make_array1d_view() [2/5]

template<typename Iterator >
array1d_view< Iterator >::view cusp::make_array1d_view ( array1d_view< Iterator > &  v)

This is a convenience function for generating an array1d_view using a array1d_view

Template Parameters
Iteratoriterator of the array1d_view
Parameters
vThe array1d_view used to construct array1d_view
Returns
array1d_view constructed using input array1d_view

Definition at line 724 of file array1d.h.

◆ make_array1d_view() [3/5]

template<typename T , typename MemorySpace >
array1d< T, MemorySpace >::const_view cusp::make_array1d_view ( const array1d< T, MemorySpace > &  v)

This is a convenience function for generating an array1d_view using an array1d

Template Parameters
Tvalue_type of the array
MemorySpacememory space of the array (cusp::host_memory or cusp::device_memory)
Parameters
vThe array1d used to construct array1d_view
Returns
constant array1d_view constructed using input array1d

Definition at line 751 of file array1d.h.

◆ make_array1d_view() [4/5]

template<typename Iterator >
array1d_view< Iterator >::view cusp::make_array1d_view ( const array1d_view< Iterator > &  v)

This is a convenience function for generating an array1d_view using a const array1d_view

Template Parameters
Iteratoriterator of the array1d_view
Parameters
vThe array1d_view used to construct array1d_view
Returns
array1d_view constructed using input array1d_view

Definition at line 737 of file array1d.h.

◆ make_array1d_view() [5/5]

template<typename Iterator >
array1d_view< Iterator > cusp::make_array1d_view ( Iterator  first,
Iterator  last 
)

This is a convenience function for generating an array1d_view using iterators

Template Parameters
Iteratoriterator type of copy elements
Parameters
firstThe beginning of the range.
lastThe end of the range.
Returns
array1d_view constructed using Iterator

Definition at line 695 of file array1d.h.

◆ make_array2d_view() [1/4]

template<typename Array , typename Orientation >
array2d_view< Array, Orientation > cusp::make_array2d_view ( const array2d_view< Array, Orientation > &  v)

This is a convenience function for generating an array2d_view using an array2d_view

Template Parameters
ArrayType of input array containing values
Orientationorientation of the array (cusp::row_major or cusp::column_major)
Parameters
vThe array2d_view used to construct array2d_view
Returns
array2d_view constructed using input array2d_view

Definition at line 494 of file array2d.h.

◆ make_array2d_view() [2/4]

template<typename T , class MemorySpace , class Orientation >
array2d_view< typename cusp::array1d_view< typename cusp::array1d< T, MemorySpace >::const_iterator >, Orientation > cusp::make_array2d_view ( const cusp::array2d< T, MemorySpace, Orientation > &  v)

This is a convenience function for generating an array2d_view using an array2d

Template Parameters
Tvalue_type of the array
MemorySpacememory space of the array (cusp::host_memory or cusp::device_memory)
Orientationorientation of the array (cusp::row_major or cusp::column_major)
Parameters
vThe const array2d used to construct array2d_view
Returns
constant array2d_view constructed using input array2d

Definition at line 526 of file array2d.h.

◆ make_array2d_view() [3/4]

template<typename T , class MemorySpace , class Orientation >
array2d_view< typename cusp::array1d_view< typename cusp::array1d< T, MemorySpace >::iterator >, Orientation > cusp::make_array2d_view ( cusp::array2d< T, MemorySpace, Orientation > &  v)

This is a convenience function for generating an array2d_view using an array2d_view

Template Parameters
Tvalue_type of the array
MemorySpacememory space of the array (cusp::host_memory or cusp::device_memory)
Orientationorientation of the array (cusp::row_major or cusp::column_major)
Parameters
vThe array2d used to construct array2d_view
Returns
array2d_view constructed using input array2d

Definition at line 510 of file array2d.h.

◆ make_array2d_view() [4/4]

template<typename Iterator , typename Orientation >
array2d_view< typename cusp::array1d_view< Iterator >, Orientation > cusp::make_array2d_view ( size_t  num_rows,
size_t  num_cols,
size_t  pitch,
const cusp::array1d_view< Iterator > &  values,
Orientation   
)

This is a convenience function for generating an array2d_view using specified shape and values

Template Parameters
Iteratorarray1d_view iterator used to construct array2d_view
Orientationorientation of the array (cusp::row_major or cusp::column_major)
Parameters
num_rowsThe number of array2d_view rows.
num_colsThe number of array2d_view columns.
pitchThe stride between entries in the major dimension.
valuesarray1d_view containing this array2d_view's values.

Definition at line 479 of file array2d.h.