Cuda Namespace Reference

This namespace contains all classes and functions of the CUDA templates. More...


Classes

class  Array
 Representation of CUDA array. More...
struct  CopyConstantKernel
 Generic template class for call to "copy constant" kernel. More...
class  DeviceMemory
 Representation of global GPU memory. More...
class  DeviceMemoryStorage
 Representation of global GPU memory managed by CUDA templates. More...
class  DeviceMemoryLinear
 Representation of linear GPU memory. More...
class  DeviceMemoryMapped
 Mapped to existing buffer in GPU main memory. More...
class  DeviceMemoryPitched
 Representation of linear GPU memory with proper padding. More...
class  DeviceMemoryReference
 Reference to existing buffer in GPU main memory. More...
class  DeviceProperties
 Properties of CUDA device. More...
class  Event
 CUDA runtime event class. More...
class  GilReference2D
 Reference to existing boost::gil image. More...
class  HostMemory
 Representation of CPU memory. More...
class  HostMemoryStorage
 Representation of CPU memory managed by the CUDA Toolkit. More...
class  HostMemoryHeap
 Representation of heap memory on the CPU. More...
class  HostMemoryLocked
 Representation of page-locked CPU memory. More...
class  HostMemoryReference
 Reference to existing buffer in CPU main memory. More...
class  Image
 Image. More...
class  IplReference
 Reference to existing IPL image. More...
class  Iterator
 Generic iterator over n-dimensional data. More...
class  ItkReference
 Reference to existing ITK image. More...
class  Layout
 Description of memory layout of multidimensional data. More...
class  Pointer
 Class to represent memory that is accessible via a pointer. More...
class  PointerStorage
 Class to represent memory that can be allocated and freed and is accessible via a typed pointer. More...
class  SizeBase
 Base class for multi-dimensional size type. More...
class  Spacing
 Generic spacing template. More...
class  Size
 Generic size template. More...
class  SSizeBase
 Base class for multi-dimensional ssize type. More...
class  SSize
 Generic size template. More...
class  Storage
 Class to represent memory that can be allocated and freed. More...
class  Stream
 CUDA stream class. More...
class  Symbol
 Representation of CUDA symbol. More...
class  VectorBase
 Base class for vector type. More...
class  Vector
 Generic vector template. More...
class  Array1D
 Array template specialized for 1 dimension(s). More...
class  Array2D
 Array template specialized for 2 dimension(s). More...
class  Array3D
 Array template specialized for 3 dimension(s). More...
class  DeviceMemoryLinear1D
 DeviceMemoryLinear template specialized for 1 dimension(s). More...
class  DeviceMemoryLinear2D
 DeviceMemoryLinear template specialized for 2 dimension(s). More...
class  DeviceMemoryLinear3D
 DeviceMemoryLinear template specialized for 3 dimension(s). More...
class  DeviceMemoryPitched1D
 DeviceMemoryPitched template specialized for 1 dimension(s). More...
class  DeviceMemoryPitched2D
 DeviceMemoryPitched template specialized for 2 dimension(s). More...
class  DeviceMemoryPitched3D
 DeviceMemoryPitched template specialized for 3 dimension(s). More...
class  DeviceMemoryReference1D
 DeviceMemoryReference template specialized for 1 dimension(s). More...
class  DeviceMemoryReference2D
 DeviceMemoryReference template specialized for 2 dimension(s). More...
class  DeviceMemoryReference3D
 DeviceMemoryReference template specialized for 3 dimension(s). More...
class  GilReference1D
 GilReference template specialized for 1 dimension(s). More...
class  GilReference3D
 GilReference template specialized for 3 dimension(s). More...
class  HostMemoryHeap1D
 HostMemoryHeap template specialized for 1 dimension(s). More...
class  HostMemoryHeap2D
 HostMemoryHeap template specialized for 2 dimension(s). More...
class  HostMemoryHeap3D
 HostMemoryHeap template specialized for 3 dimension(s). More...
class  HostMemoryLocked1D
 HostMemoryLocked template specialized for 1 dimension(s). More...
class  HostMemoryLocked2D
 HostMemoryLocked template specialized for 2 dimension(s). More...
class  HostMemoryLocked3D
 HostMemoryLocked template specialized for 3 dimension(s). More...
class  HostMemoryReference1D
 HostMemoryReference template specialized for 1 dimension(s). More...
class  HostMemoryReference2D
 HostMemoryReference template specialized for 2 dimension(s). More...
class  HostMemoryReference3D
 HostMemoryReference template specialized for 3 dimension(s). More...
class  IplReference1D
 IplReference template specialized for 1 dimension(s). More...
class  IplReference2D
 IplReference template specialized for 2 dimension(s). More...
class  IplReference3D
 IplReference template specialized for 3 dimension(s). More...
class  ItkReference1D
 ItkReference template specialized for 1 dimension(s). More...
class  ItkReference2D
 ItkReference template specialized for 2 dimension(s). More...
class  ItkReference3D
 ItkReference template specialized for 3 dimension(s). More...
class  Symbol1D
 Symbol template specialized for 1 dimension(s). More...
class  Symbol2D
 Symbol template specialized for 2 dimension(s). More...
class  Symbol3D
 Symbol template specialized for 3 dimension(s). More...
class  Size< 1 >
 Specialization of size template for 1D case. More...
class  Size< 2 >
 Specialization of size template for 1D case. More...
class  Size< 3 >
 Specialization of size template for 1D case. More...
class  SSize< 1 >
 Specialization of size template for 1D case. More...
class  SSize< 2 >
 Specialization of size template for 1D case. More...
class  SSize< 3 >
 Specialization of size template for 1D case. More...
class  Vector< Type, 1 >
 Specialization of size template for 1D case. More...
class  Vector< Type, 2 >
 Specialization of size template for 1D case. More...
class  Vector< Type, 3 >
 Specialization of size template for 1D case. More...

Namespaces

namespace  BLAS
 This namespace wraps the CUBLAS functionality.
namespace  FFT
 This namespace wraps the CUFFT functionality.
namespace  OpenGL
 This namespace contains all OpenGL-related classes and functions of the CUDA templates.

Functions

template<class Type1, class Type2, unsigned Dim>
void copy (HostMemory< Type1, Dim > &dst, const HostMemory< Type2, Dim > &src)
 Convert data in host memory.
template<class Type1, class Type2, unsigned Dim>
void copy (DeviceMemory< Type1, Dim > &dst, const DeviceMemory< Type2, Dim > &src)
 Convert data in device memory.
template<class Type1, class Type2, unsigned Dim>
void copy (HostMemory< Type1, Dim > &dst, const HostMemory< Type2, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size)
 Convert data in host memory.
template<class Type, unsigned Dim>
void copy (Pointer< Type, Dim > &dst, const Pointer< Type, Dim > &src, cudaMemcpyKind kind)
 Generic copy method for host and/or device memory.
template<class Type, unsigned Dim>
void copy (Pointer< Type, Dim > &dst, const Pointer< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size, cudaMemcpyKind kind)
 Generic region copy method for host and/or device memory.
template<class Type, unsigned Dim>
void copy (DeviceMemory< Type, Dim > &dst, const HostMemory< Type, Dim > &src)
 Copy host memory to device memory.
template<class Type, unsigned Dim>
void copy (DeviceMemory< Type, Dim > &dst, const HostMemory< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size)
 Copy region from host memory to device memory.
template<class Type, unsigned Dim>
void copy (HostMemory< Type, Dim > &dst, const DeviceMemory< Type, Dim > &src)
 Copy device memory to host memory.
template<class Type, unsigned Dim>
void copy (HostMemory< Type, Dim > &dst, const DeviceMemory< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size)
 Copy region from device memory to host memory.
template<class Type, unsigned Dim>
void copy (DeviceMemory< Type, Dim > &dst, const DeviceMemory< Type, Dim > &src)
 Copy device memory to device memory.
template<class Type, unsigned Dim>
void copy (DeviceMemory< Type, Dim > &dst, const DeviceMemory< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size)
 Copy region from device memory to device memory.
template<class Type, unsigned Dim>
void copy (HostMemory< Type, Dim > &dst, const HostMemory< Type, Dim > &src)
 Copy host memory to host memory.
template<class Type, unsigned Dim>
void copy (HostMemory< Type, Dim > &dst, const HostMemory< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size)
 Copy region from host memory to host memory.
template<class Type, unsigned Dim>
void copyFromArray (Pointer< Type, Dim > &dst, const Array< Type, Dim > &src, cudaMemcpyKind kind)
 Generic copy method from CUDA array to host/device memory.
template<class Type, unsigned Dim>
void copyFromArray (Pointer< Type, Dim > &dst, const Array< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size, cudaMemcpyKind kind)
 Generic region copy method from CUDA array to host/device memory.
template<class Type, unsigned Dim>
void copy (HostMemory< Type, Dim > &dst, const Array< Type, Dim > &src)
 Copy CUDA array to host memory.
template<class Type, unsigned Dim>
void copy (HostMemory< Type, Dim > &dst, const Array< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size)
 Copy region from CUDA array to host memory.
template<class Type, unsigned Dim>
void copy (DeviceMemory< Type, Dim > &dst, const Array< Type, Dim > &src)
 Copy CUDA array to device memory.
template<class Type, unsigned Dim>
void copy (DeviceMemory< Type, Dim > &dst, const Array< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size)
 Copy region from CUDA array to device memory.
template<class Type, unsigned Dim>
void copyToArray (Array< Type, Dim > &dst, const Pointer< Type, Dim > &src, cudaMemcpyKind kind)
 Generic copy method from host/device memory to CUDA array.
template<class Type, unsigned Dim>
void copyToArray (Array< Type, Dim > &dst, const Pointer< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size, cudaMemcpyKind kind)
 Generic copy method from host/device memory to CUDA array.
template<class Type, unsigned Dim>
void copy (Array< Type, Dim > &dst, const HostMemory< Type, Dim > &src)
 Copy host memory to CUDA array.
template<class Type, unsigned Dim>
void copy (Array< Type, Dim > &dst, const HostMemory< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size)
 Copy region from host memory to CUDA array.
template<class Type, unsigned Dim>
void copy (Array< Type, Dim > &dst, const DeviceMemory< Type, Dim > &src)
 Copy device memory to CUDA array.
template<class Type, unsigned Dim>
void copy (Array< Type, Dim > &dst, const DeviceMemory< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size)
 Copy region from device memory to CUDA array.
template<class Type, unsigned Dim>
void copy (Array< Type, Dim > &dst, const Array< Type, Dim > &src)
 Copy CUDA array to CUDA array.
template<class Type, unsigned Dim>
void copy (Array< Type, Dim > &dst, const Array< Type, Dim > &src, const Size< Dim > &dst_ofs, const Size< Dim > &src_ofs, const Size< Dim > &size)
 Copy region from CUDA array to CUDA array.
template<class Type, unsigned Dim>
void copyFromSymbol (Pointer< Type, Dim > &dst, const Symbol< Type, Dim > &src, cudaMemcpyKind kind)
 Generic copy method from CUDA symbol to host/device memory.
template<class Type, unsigned Dim>
void copy (HostMemory< Type, Dim > &dst, const Symbol< Type, Dim > &src)
 Copy CUDA symbol to host memory.
template<class Type, unsigned Dim>
void copy (DeviceMemory< Type, Dim > &dst, const Symbol< Type, Dim > &src)
 Copy CUDA symbol to device memory.
template<class Type, unsigned Dim>
void copyToSymbol (Symbol< Type, Dim > &dst, const Pointer< Type, Dim > &src, cudaMemcpyKind kind)
 Generic copy method from host/device memory to CUDA symbol.
template<class Type, unsigned Dim>
void copy (Symbol< Type, Dim > &dst, const HostMemory< Type, Dim > &src)
 Copy host memory to CUDA symbol.
template<class Type, unsigned Dim>
void copy (Symbol< Type, Dim > &dst, const DeviceMemory< Type, Dim > &src)
 Copy device memory to CUDA symbol.
template<class TypeDst, class TypeSrc>
void copy (TypeDst &dst, const TypeSrc &src, const Size< TypeDst::Dim > &dst_ofs, const SSize< TypeSrc::Dim > &src_ofs, const Size< TypeDst::Dim > &size, border_t border)
 Generic copy method with border handling.
template<class Type, unsigned Dim>
void copy (HostMemory< Type, Dim > &dst, const Type &val, const Size< Dim > &dst_ofs, const Size< Dim > &size)
 Copy constant value to region in host memory.
template<class Type, unsigned Dim>
void copy (HostMemory< Type, Dim > &dst, const Type &val)
 Copy constant value to host memory.
template<class Type, unsigned Dim>
void copy (DeviceMemory< Type, Dim > &dst, Type val, const Size< Dim > &dst_ofs, const Size< Dim > &size)
 Copy constant value to region in device memory.
template<class Type, unsigned Dim>
void copy (DeviceMemory< Type, Dim > &dst, Type val)
 Copy constant value to device memory.
int divup (int a, int b)
 Integer division with result rounded up.
int divdown (int a, int b)
 Integer division with result rounded down.
template<class Type1, class Type2, unsigned Dim>
bool operator== (const VectorBase< Type1, Dim > &v1, const VectorBase< Type2, Dim > &v2)
 Equality operator.
template<class Type1, class Type2, unsigned Dim>
bool operator!= (const VectorBase< Type1, Dim > &v1, const VectorBase< Type2, Dim > &v2)
 Inequality operator.


Detailed Description

This namespace contains all classes and functions of the CUDA templates.

Function Documentation

template<class Type, unsigned Dim>
void Cuda::copy ( DeviceMemory< Type, Dim > &  dst,
Type  val 
) [inline]

Copy constant value to device memory.

Parameters:
dst destination pointer (device memory)
val value to copy
Since this function calls a CUDA kernel, it is only available if the file from which this function is called is compiled by nvcc.
Parameters:
dst destination pointer (device memory)
val value to copy

template<class Type, unsigned Dim>
void Cuda::copy ( DeviceMemory< Type, Dim > &  dst,
Type  val,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  size 
) [inline]

Copy constant value to region in device memory.

Since this function calls a CUDA kernel, its implementation is in a separate file "copy_constants.hpp", which must be included in a .cu file. Note that you will get "multiply defined symbols" errors in the linker if you access the same template functions in "copy_constants.hpp" in more than one file since the compiler creates separate template instantiations for each occurence. In this case you should put explicit template instantiations into a single file (see https://cudatemplates.svn.sourceforge.net/svnroot/cudatemplates/trunk/testing/copy_instantiate.cu for an example).

Parameters:
dst destination pointer (device memory)
val value to copy
dst_ofs destination offset
size size of region
Since this function calls a CUDA kernel, it is only available if the file from which this function is called is compiled by nvcc.
Parameters:
dst destination pointer (device memory)
val value to copy
dst_ofs destination offset
size size of region

template<class Type, unsigned Dim>
void Cuda::copy ( HostMemory< Type, Dim > &  dst,
const Type &  val 
) [inline]

Copy constant value to host memory.

Parameters:
dst destination pointer (host memory)
val value to copy

template<class Type, unsigned Dim>
void Cuda::copy ( HostMemory< Type, Dim > &  dst,
const Type &  val,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  size 
) [inline]

Copy constant value to region in host memory.

Parameters:
dst destination pointer (host memory)
val value to copy
dst_ofs destination offset
size size of region

template<class TypeDst, class TypeSrc>
void Cuda::copy ( TypeDst &  dst,
const TypeSrc &  src,
const Size< TypeDst::Dim > &  dst_ofs,
const SSize< TypeSrc::Dim > &  src_ofs,
const Size< TypeDst::Dim > &  size,
border_t  border 
) [inline]

Generic copy method with border handling.

Parameters:
dst destination
src source
dst_ofs destination offset
src_ofs source offset
size size of region to be copied
border border handling for source data

template<class Type, unsigned Dim>
void Cuda::copy ( Symbol< Type, Dim > &  dst,
const DeviceMemory< Type, Dim > &  src 
) [inline]

Copy device memory to CUDA symbol.

Parameters:
dst destination symbol (device memory)
src source pointer (device memory)

template<class Type, unsigned Dim>
void Cuda::copy ( Symbol< Type, Dim > &  dst,
const HostMemory< Type, Dim > &  src 
) [inline]

Copy host memory to CUDA symbol.

Parameters:
dst destination symbol (device memory)
src source pointer (host memory)

template<class Type, unsigned Dim>
void Cuda::copy ( DeviceMemory< Type, Dim > &  dst,
const Symbol< Type, Dim > &  src 
) [inline]

Copy CUDA symbol to device memory.

Parameters:
dst destination pointer (device memory)
src source symbol (device memory)

template<class Type, unsigned Dim>
void Cuda::copy ( HostMemory< Type, Dim > &  dst,
const Symbol< Type, Dim > &  src 
) [inline]

Copy CUDA symbol to host memory.

Parameters:
dst destination pointer (host memory)
src source symbol (device memory)

template<class Type, unsigned Dim>
void Cuda::copy ( Array< Type, Dim > &  dst,
const Array< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size 
) [inline]

Copy region from CUDA array to CUDA array.

Parameters:
dst destination CUDA array
src source CUDA array
dst_ofs destination offset
src_ofs source offset
size size of region to be copied

template<class Type, unsigned Dim>
void Cuda::copy ( Array< Type, Dim > &  dst,
const Array< Type, Dim > &  src 
) [inline]

Copy CUDA array to CUDA array.

Parameters:
dst destination CUDA array
src source CUDA array

template<class Type, unsigned Dim>
void Cuda::copy ( Array< Type, Dim > &  dst,
const DeviceMemory< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size 
) [inline]

Copy region from device memory to CUDA array.

Parameters:
dst destination CUDA array
src source pointer (device memory)
dst_ofs destination offset
src_ofs source offset
size size of region to be copied

template<class Type, unsigned Dim>
void Cuda::copy ( Array< Type, Dim > &  dst,
const DeviceMemory< Type, Dim > &  src 
) [inline]

Copy device memory to CUDA array.

Parameters:
dst destination CUDA array
src source pointer (device memory)

template<class Type, unsigned Dim>
void Cuda::copy ( Array< Type, Dim > &  dst,
const HostMemory< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size 
) [inline]

Copy region from host memory to CUDA array.

Parameters:
dst destination CUDA array
src source pointer (host memory)
dst_ofs destination offset
src_ofs source offset
size size of region to be copied

template<class Type, unsigned Dim>
void Cuda::copy ( Array< Type, Dim > &  dst,
const HostMemory< Type, Dim > &  src 
) [inline]

Copy host memory to CUDA array.

Parameters:
dst destination CUDA array
src source pointer (host memory)

template<class Type, unsigned Dim>
void Cuda::copy ( DeviceMemory< Type, Dim > &  dst,
const Array< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size 
) [inline]

Copy region from CUDA array to device memory.

Parameters:
dst destination pointer (device memory)
src source CUDA array
dst_ofs destination offset
src_ofs source offset
size size of region to be copied

template<class Type, unsigned Dim>
void Cuda::copy ( DeviceMemory< Type, Dim > &  dst,
const Array< Type, Dim > &  src 
) [inline]

Copy CUDA array to device memory.

Parameters:
dst destination pointer (device memory)
src source CUDA array

template<class Type, unsigned Dim>
void Cuda::copy ( HostMemory< Type, Dim > &  dst,
const Array< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size 
) [inline]

Copy region from CUDA array to host memory.

Parameters:
dst destination pointer (host memory)
src source CUDA array
dst_ofs destination offset
src_ofs source offset
size size of region to be copied

template<class Type, unsigned Dim>
void Cuda::copy ( HostMemory< Type, Dim > &  dst,
const Array< Type, Dim > &  src 
) [inline]

Copy CUDA array to host memory.

Parameters:
dst destination pointer (host memory)
src source CUDA array

template<class Type, unsigned Dim>
void Cuda::copy ( HostMemory< Type, Dim > &  dst,
const HostMemory< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size 
) [inline]

Copy region from host memory to host memory.

Parameters:
dst destination pointer (host memory)
src source pointer (host memory)
dst_ofs destination offset
src_ofs source offset
size size of region to be copied

template<class Type, unsigned Dim>
void Cuda::copy ( HostMemory< Type, Dim > &  dst,
const HostMemory< Type, Dim > &  src 
) [inline]

Copy host memory to host memory.

Parameters:
dst destination pointer (host memory)
src source pointer (host memory)

template<class Type, unsigned Dim>
void Cuda::copy ( DeviceMemory< Type, Dim > &  dst,
const DeviceMemory< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size 
) [inline]

Copy region from device memory to device memory.

Parameters:
dst destination pointer (device memory)
src source pointer (device memory)
dst_ofs destination offset
src_ofs source offset
size size of region to be copied

template<class Type, unsigned Dim>
void Cuda::copy ( DeviceMemory< Type, Dim > &  dst,
const DeviceMemory< Type, Dim > &  src 
) [inline]

Copy device memory to device memory.

Parameters:
dst destination pointer (device memory)
src source pointer (device memory)

template<class Type, unsigned Dim>
void Cuda::copy ( HostMemory< Type, Dim > &  dst,
const DeviceMemory< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size 
) [inline]

Copy region from device memory to host memory.

Parameters:
dst destination pointer (host memory)
src source pointer (device memory)
dst_ofs destination offset
src_ofs source offset
size size of region to be copied

template<class Type, unsigned Dim>
void Cuda::copy ( HostMemory< Type, Dim > &  dst,
const DeviceMemory< Type, Dim > &  src 
) [inline]

Copy device memory to host memory.

Parameters:
dst destination pointer (host memory)
src source pointer (device memory)

template<class Type, unsigned Dim>
void Cuda::copy ( DeviceMemory< Type, Dim > &  dst,
const HostMemory< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size 
) [inline]

Copy region from host memory to device memory.

Parameters:
dst destination pointer (device memory)
src source pointer (host memory)
dst_ofs destination offset
src_ofs source offset
size size of region to be copied

template<class Type, unsigned Dim>
void Cuda::copy ( DeviceMemory< Type, Dim > &  dst,
const HostMemory< Type, Dim > &  src 
) [inline]

Copy host memory to device memory.

Parameters:
dst destination pointer (device memory)
src source pointer (host memory)

template<class Type, unsigned Dim>
void Cuda::copy ( Pointer< Type, Dim > &  dst,
const Pointer< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size,
cudaMemcpyKind  kind 
) [inline]

Generic region copy method for host and/or device memory.

It is not recommended to call this function directly since its correct behaviour depends on the kind parameter (just as the underlying CUDA functions).

Parameters:
dst generic destination pointer
src generic source pointer
dst_ofs destination offset
src_ofs source offset
size size of region to be copied
kind direction of copy

template<class Type, unsigned Dim>
void Cuda::copy ( Pointer< Type, Dim > &  dst,
const Pointer< Type, Dim > &  src,
cudaMemcpyKind  kind 
) [inline]

Generic copy method for host and/or device memory.

It is not recommended to call this function directly since its correct behaviour depends on the kind parameter (just as the underlying CUDA functions).

Parameters:
dst generic destination pointer
src generic source pointer
kind direction of copy

template<class Type1, class Type2, unsigned Dim>
void Cuda::copy ( HostMemory< Type1, Dim > &  dst,
const HostMemory< Type2, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size 
) [inline]

Convert data in host memory.

Parameters:
dst generic destination pointer
src generic source pointer
dst_ofs destination offset
src_ofs source offset
size size of region to be converted

template<class Type1, class Type2, unsigned Dim>
void Cuda::copy ( DeviceMemory< Type1, Dim > &  dst,
const DeviceMemory< Type2, Dim > &  src 
) [inline]

Convert data in device memory.

Since this function calls a CUDA kernel, it is only available if the file from which this function is called is compiled by nvcc.

Parameters:
dst destination pointer
src source pointer

template<class Type1, class Type2, unsigned Dim>
void Cuda::copy ( HostMemory< Type1, Dim > &  dst,
const HostMemory< Type2, Dim > &  src 
) [inline]

Convert data in host memory.

Parameters:
dst destination pointer
src source pointer

template<class Type, unsigned Dim>
void Cuda::copyFromArray ( Pointer< Type, Dim > &  dst,
const Array< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size,
cudaMemcpyKind  kind 
) [inline]

Generic region copy method from CUDA array to host/device memory.

It is not recommended to call this function directly since its correct behaviour depends on the kind parameter (just as the underlying CUDA functions).

Parameters:
dst generic destination pointer
src source CUDA array
dst_ofs destination offset
src_ofs source offset
size size of region to be copied
kind direction of copy

template<class Type, unsigned Dim>
void Cuda::copyFromArray ( Pointer< Type, Dim > &  dst,
const Array< Type, Dim > &  src,
cudaMemcpyKind  kind 
) [inline]

Generic copy method from CUDA array to host/device memory.

It is not recommended to call this function directly since its correct behaviour depends on the kind parameter (just as the underlying CUDA functions).

Parameters:
dst generic destination pointer
src source CUDA array
kind direction of copy

template<class Type, unsigned Dim>
void Cuda::copyFromSymbol ( Pointer< Type, Dim > &  dst,
const Symbol< Type, Dim > &  src,
cudaMemcpyKind  kind 
) [inline]

Generic copy method from CUDA symbol to host/device memory.

It is not recommended to call this function directly since its correct behaviour depends on the kind parameter (just as the underlying CUDA functions).

Parameters:
dst generic destination pointer
src source CUDA symbol
kind direction of copy

template<class Type, unsigned Dim>
void Cuda::copyToArray ( Array< Type, Dim > &  dst,
const Pointer< Type, Dim > &  src,
const Size< Dim > &  dst_ofs,
const Size< Dim > &  src_ofs,
const Size< Dim > &  size,
cudaMemcpyKind  kind 
) [inline]

Generic copy method from host/device memory to CUDA array.

It is not recommended to call this function directly since its correct behaviour depends on the kind parameter (just as the underlying CUDA functions).

Parameters:
dst destination CUDA array
src generic source pointer
dst_ofs destination offset
src_ofs source offset
size size of region to be copied
kind direction of copy

template<class Type, unsigned Dim>
void Cuda::copyToArray ( Array< Type, Dim > &  dst,
const Pointer< Type, Dim > &  src,
cudaMemcpyKind  kind 
) [inline]

Generic copy method from host/device memory to CUDA array.

It is not recommended to call this function directly since its correct behaviour depends on the kind parameter (just as the underlying CUDA functions).

Parameters:
dst destination CUDA array
src generic source pointer
kind direction of copy

template<class Type, unsigned Dim>
void Cuda::copyToSymbol ( Symbol< Type, Dim > &  dst,
const Pointer< Type, Dim > &  src,
cudaMemcpyKind  kind 
) [inline]

Generic copy method from host/device memory to CUDA symbol.

It is not recommended to call this function directly since its correct behaviour depends on the kind parameter (just as the underlying CUDA functions).

Parameters:
dst destination CUDA symbol
src generic source pointer
kind direction of copy

template<class Type1, class Type2, unsigned Dim>
bool Cuda::operator!= ( const VectorBase< Type1, Dim > &  v1,
const VectorBase< Type2, Dim > &  v2 
) [inline]

Inequality operator.

Parameters:
v1 first vector
v2 second vector
Returns:
true if first and second vector are not equal, otherwise false

template<class Type1, class Type2, unsigned Dim>
bool Cuda::operator== ( const VectorBase< Type1, Dim > &  v1,
const VectorBase< Type2, Dim > &  v2 
) [inline]

Equality operator.

Parameters:
v1 first vector
v2 second vector
Returns:
true if first and second vector are equal, otherwise false


Generated on Sun Sep 13 00:55:17 2009 for cudatemplates by  doxygen 1.5.6