cudpp.h File Reference

Main library header file. Defines public interface. More...

#include <stdlib.h>

Classes

struct  CUDPPConfiguration
 Configuration struct used to specify algorithm, datatype, operator, and options when creating a plan for CUDPP algorithms. More...

Enumerations

enum  CUDPPResult { CUDPP_SUCCESS = 0, CUDPP_ERROR_INVALID_HANDLE, CUDPP_ERROR_ILLEGAL_CONFIGURATION, CUDPP_ERROR_UNKNOWN = 9999 }
 CUDPP Result codes returned by CUDPP API functions. More...
enum  CUDPPOption {
  CUDPP_OPTION_FORWARD = 0x1, CUDPP_OPTION_BACKWARD = 0x2, CUDPP_OPTION_EXCLUSIVE = 0x4, CUDPP_OPTION_INCLUSIVE = 0x8,
  CUDPP_OPTION_CTA_LOCAL = 0x10
}
 Options for configuring CUDPP algorithms. More...
enum  CUDPPDatatype {
  CUDPP_CHAR, CUDPP_UCHAR, CUDPP_INT, CUDPP_UINT,
  CUDPP_FLOAT
}
 Datatypes supported by CUDPP algorithms. More...
enum  CUDPPOperator { CUDPP_ADD, CUDPP_MULTIPLY, CUDPP_MIN, CUDPP_MAX }
 Operators supported by CUDPP algorithms (currently scan and segmented scan). More...
enum  CUDPPAlgorithm { , CUDPP_SORT_RADIX, CUDPP_SORT_RADIX_GLOBAL , CUDPP_SORT_INVALID }
 Algorithms supported by CUDPP. Used to create appropriate plans using cudppPlan. More...

Functions

CUDPP_DLL CUDPPResult cudppPlan (CUDPPHandle *planHandle, CUDPPConfiguration config, size_t n, size_t rows, size_t rowPitch)
 Create a CUDPP plan.
CUDPP_DLL CUDPPResult cudppDestroyPlan (CUDPPHandle plan)
 Destroy a CUDPP Plan.
CUDPP_DLL CUDPPResult cudppScan (CUDPPHandle planHandle, void *d_out, const void *d_in, size_t numElements)
 Performs a scan operation of numElements on its input in GPU memory (d_in) and places the output in GPU memory (d_out), with the scan parameters specified in the plan pointed to by planHandle.
CUDPP_DLL CUDPPResult cudppMultiScan (CUDPPHandle planHandle, void *d_out, const void *d_in, size_t numElements, size_t numRows)
 Performs numRows parallel scan operations of numElements each on its input (d_in) and places the output in d_out, with the scan parameters set by config. Exactly like cudppScan except that it runs on multiple rows in parallel.
CUDPP_DLL CUDPPResult cudppSegmentedScan (CUDPPHandle planHandle, void *d_out, const void *d_idata, const unsigned int *d_iflags, size_t numElements)
 Performs a segmented scan operation of numElements on its input in GPU memory (d_idata) and places the output in GPU memory (d_out), with the scan parameters specified in the plan pointed to by planHandle.
CUDPP_DLL CUDPPResult cudppCompact (CUDPPHandle planHandle, void *d_out, size_t *d_numValidElements, const void *d_in, const unsigned int *d_isValid, size_t numElements)
 Given an array d_in and an array of 1/0 flags in deviceValid, returns a compacted array in d_out of corresponding only the "valid" values from d_in.
CUDPP_DLL CUDPPResult cudppSort (CUDPPHandle planHandle, void *d_out, const void *d_in, size_t numElements)
 Sorts d_in into d_out.
CUDPP_DLL CUDPPResult cudppSparseMatrix (CUDPPHandle *sparseMatrixHandle, CUDPPConfiguration config, size_t n, size_t rows, const void *A, const unsigned int *h_rowIndices, const unsigned int *h_indices)
 Create a CUDPP Sparse Matrix Object.
CUDPP_DLL CUDPPResult cudppDestroySparseMatrix (CUDPPHandle sparseMatrixHandle)
 Destroy a CUDPP Sparse Matrix Object.
CUDPP_DLL CUDPPResult cudppSparseMatrixVectorMultiply (CUDPPHandle sparseMatrixHandle, void *d_y, const void *d_x)
 Perform matrix-vector multiply y = A*x for arbitrary sparse matrix A and vector x.


Detailed Description

Main library header file. Defines public interface.

cudpp.h

The CUDPP public interface is a C-only interface to enable linking with code written in other languages (e.g. C, C++, and Fortran). While the internals of CUDPP are not limited to C (C++ features are used), the public interface is entirely C (thus it is declared "extern C").


Enumeration Type Documentation

CUDPP Result codes returned by CUDPP API functions.

Enumerator:
CUDPP_SUCCESS  No error.
CUDPP_ERROR_INVALID_HANDLE  Specified handle (for example, to a plan) is invalid.
CUDPP_ERROR_ILLEGAL_CONFIGURATION  Specified configuration is illegal. For example, an invalid or illogical combination of options.
CUDPP_ERROR_UNKNOWN  Unknown or untraceable error.

Options for configuring CUDPP algorithms.

See also:
CUDPPConfiguration, cudppPlan, CUDPPAlgorithm
Enumerator:
CUDPP_OPTION_FORWARD  Algorithms operate forward: from start to end of input array
CUDPP_OPTION_BACKWARD  Algorithms operate backward: from end to start of array
CUDPP_OPTION_EXCLUSIVE  Exclusive (for scans) - scan includes all elements up to (but not including) the current element
CUDPP_OPTION_INCLUSIVE  Inclusive (for scans) - scan includes all elements up to and including the current element
CUDPP_OPTION_CTA_LOCAL  Algorithm performed only on the CTAs (blocks) with no communication between blocks.
Todo:
Currently only works for sort -- make it work for scan.

Datatypes supported by CUDPP algorithms.

See also:
CUDPPConfiguration, cudppPlan
Enumerator:
CUDPP_CHAR  Character type (C char).
CUDPP_UCHAR  Unsigned character (byte) type (C unsigned char).
CUDPP_INT  Integer type (C int).
CUDPP_UINT  Unsigned integer type (C unsigned int).
CUDPP_FLOAT  Float type (C float).

Operators supported by CUDPP algorithms (currently scan and segmented scan).

These are all binary associative operators.

See also:
CUDPPConfiguration, cudppPlan
Enumerator:
CUDPP_ADD  Addition of two operands.
CUDPP_MULTIPLY  Multiplication of two operands.
CUDPP_MIN  Minimum of two operands.
CUDPP_MAX  Maximum of two operands.

Algorithms supported by CUDPP. Used to create appropriate plans using cudppPlan.

See also:
CUDPPConfiguration, cudppPlan
Enumerator:
CUDPP_SORT_RADIX  Radix sort within chunks, merge sort to merge chunks together
CUDPP_SORT_RADIX_GLOBAL  Global radix sort across entire input, no merge
CUDPP_SORT_INVALID  Placeholder at end of enum


Generated on Sun Apr 20 19:51:33 2008 for CUDPP by  doxygen 1.5.5