isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
isce3::cuda::io::RasterDataStream Class Reference

Utility class for asynchronously reading/writing between Rasters and device memory. More...

#include <DataStream.h>

Public Member Functions

 RasterDataStream (isce3::io::Raster *raster, isce3::cuda::core::Stream stream, std::size_t buffer_size=0)
 Constructor. More...
 
isce3::io::Rasterraster () const
 Get pointer to Raster object. More...
 
void set_raster (isce3::io::Raster *)
 Set raster. More...
 
isce3::cuda::core::Stream stream () const
 Get associated CUDA stream object. More...
 
void set_stream (isce3::cuda::core::Stream stream)
 Set CUDA stream. More...
 
std::size_t buffer_size () const
 Get stream buffer size in bytes. More...
 
void resize_buffer (std::size_t buffer_size)
 Set stream buffer size in bytes. More...
 
template<typename T >
void load (T *dst, std::size_t col, std::size_t row, std::size_t width, std::size_t length)
 Read a block of data from the Raster and copy to the current device asynchronously. More...
 
template<typename T >
void store (const T *src, std::size_t col, std::size_t row, std::size_t width, std::size_t length)
 Write a block of data from the current device to the Raster asynchronously. More...
 

Detailed Description

Utility class for asynchronously reading/writing between Rasters and device memory.

Constructor & Destructor Documentation

isce3::cuda::io::RasterDataStream::RasterDataStream ( isce3::io::Raster raster,
isce3::cuda::core::Stream  stream,
std::size_t  buffer_size = 0 
)
inline

Constructor.

Parameters
[in]rasterpointer to raster
[in]streamCUDA stream
[in]buffer_sizestream buffer size in bytes

Member Function Documentation

std::size_t isce3::cuda::io::RasterDataStream::buffer_size ( ) const
inline

Get stream buffer size in bytes.

template<typename T >
void isce3::cuda::io::RasterDataStream::load ( T *  dst,
std::size_t  col,
std::size_t  row,
std::size_t  width,
std::size_t  length 
)
inline

Read a block of data from the Raster and copy to the current device asynchronously.

Reading from the Raster may overlap with operations in other CUDA streams. Copying to the device may overlap with operations on the host or in other CUDA streams.

The destination memory address must be in device-accessible memory.

Parameters
[in]dstdestination memory address
[in]colindex of first column to read
[in]rowindex of first row to read
[in]widthnumber of columns to read
[in]lengthnumber of rows to read
isce3::io::Raster * isce3::cuda::io::RasterDataStream::raster ( ) const
inline

Get pointer to Raster object.

void isce3::cuda::io::RasterDataStream::resize_buffer ( std::size_t  buffer_size)
inline

Set stream buffer size in bytes.

void isce3::cuda::io::RasterDataStream::set_raster ( isce3::io::Raster raster)
inline

Set raster.

void isce3::cuda::io::RasterDataStream::set_stream ( isce3::cuda::core::Stream  stream)
inline

Set CUDA stream.

template<typename T >
void isce3::cuda::io::RasterDataStream::store ( const T *  src,
std::size_t  col,
std::size_t  row,
std::size_t  width,
std::size_t  length 
)
inline

Write a block of data from the current device to the Raster asynchronously.

Copying from the device may overlap with operations on the host or in other CUDA streams. Writing to the Raster may overlap with operations in other CUDA streams.

The source memory address must be in device-accessible memory.

Parameters
[in]srcsource memory address
[in]colindex of first column to write
[in]rowindex of first row to write
[in]widthnumber of columns to write
[in]lengthnumber of rows to write
isce3::cuda::core::Stream isce3::cuda::io::RasterDataStream::stream ( ) const
inline

Get associated CUDA stream object.


The documentation for this class was generated from the following files:

Generated for ISCE3.0 by doxygen 1.8.5.