Fork me on GitHub
 All Classes Files Functions Variables Groups Pages
Classes | Functions
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)
 

Function Documentation

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
Examples:
csr_view.cu.

Definition at line 693 of file array1d.h.

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 709 of file array1d.h.

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 722 of file array1d.h.

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 735 of file array1d.h.

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 749 of file array1d.h.

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 458 of file array2d.h.

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 473 of file array2d.h.

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 489 of file array2d.h.

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 505 of file array2d.h.