NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions | Variables
mgpu Namespace Reference

Classes

struct  SparseMatrix
 
struct  MatrixStats
 
struct  FormatOpPrintf
 
struct  FormatOpMaskBit
 
struct  FormatOpMarkArray
 
class  CudaAlloc
 
class  CudaAllocSimple
 
class  CudaAllocBuckets
 
class  CudaException
 
class  CudaEvent
 
class  CudaTimer
 
class  CudaDevice
 
class  CudaDeviceMem
 
class  CudaMemSupport
 
class  CudaContext
 
struct  sIsPow2
 
struct  sLogPow2
 
struct  sLogPow2< 0, roundUp >
 
struct  sLogPow2< 1, roundUp >
 
struct  sDivUp
 
struct  sDiv2RoundUp
 
struct  sDiv2RoundUp< count, 0 >
 
struct  sDivSafe
 
struct  sDivSafe< X, 0 >
 
struct  sRoundUp
 
struct  sRoundDown
 
struct  sIntegerDiv
 
struct  sMax
 
struct  sMin
 
struct  sAbs
 
struct  sNumFactorsOf2
 
struct  sNumFactorsOf2< X, 1 >
 
struct  sBankConflictDivisor
 
struct  sConflictFreeStorage
 
class  noncopyable
 
class  CudaBase
 
class  intrusive_ptr
 
class  TypeIdMap
 
struct  MatrixElement
 

Typedefs

typedef intrusive_ptr
< CudaContext
ContextPtr
 
typedef intrusive_ptr< CudaAllocAllocPtr
 
typedef unsigned char byte
 
typedef unsigned int uint
 
typedef signed short int16
 
typedef unsigned short ushort
 
typedef unsigned short uint16
 
typedef long long int64
 
typedef unsigned long long uint64
 

Enumerations

enum  MgpuBounds { MgpuBoundsLower, MgpuBoundsUpper }
 
enum  MgpuScanType { MgpuScanTypeExc, MgpuScanTypeInc }
 
enum  MgpuSearchType { MgpuSearchTypeNone, MgpuSearchTypeIndex, MgpuSearchTypeMatch, MgpuSearchTypeIndexMatch }
 
enum  MgpuJoinKind { MgpuJoinKindInner, MgpuJoinKindLeft, MgpuJoinKindRight, MgpuJoinKindOuter }
 
enum  MgpuSetOp { MgpuSetOpIntersection, MgpuSetOpUnion, MgpuSetOpDiff, MgpuSetOpSymDiff }
 

Functions

bool ReadSparseMatrix (FILE *f, std::auto_ptr< SparseMatrix > *ppMatrix, std::string &err)
 
bool ReadSparseMatrix (const char *filename, std::auto_ptr< SparseMatrix > *ppMatrix, std::string &err)
 
bool LoadBinaryMatrix (const char *filename, std::auto_ptr< SparseMatrix > *ppMatrix)
 
bool StoreBinaryMatrix (const char *filename, const SparseMatrix &matrix)
 
bool LoadCachedMatrix (const char *filename, std::auto_ptr< SparseMatrix > *ppMatrix, std::string &err)
 
template<typename T >
void SpmvTest (const SparseMatrix &m, T *results)
 
template<typename T >
void CompareVecs (const T *test, const T *ref, int count)
 
MatrixStats ComputeMatrixStats (const SparseMatrix &m)
 
int64 MulSparseMatrices (const SparseMatrix &A, const SparseMatrix &B, std::auto_ptr< SparseMatrix > *ppC)
 
int64 ComputeProductCount (const SparseMatrix &A, const SparseMatrix &B)
 
void ComputeColRanges (const SparseMatrix &A, const SparseMatrix &B, int *colMin, int *colMax)
 
std::string stringprintf (const char *format,...)
 
std::string FormatInteger (int64 x)
 
const char * TypeIdString (const std::type_info &ti)
 
template<typename T >
const char * TypeIdName ()
 
template<typename T , typename Op >
std::string FormatArrayOp (const T *data, size_t count, Op op, int numCols)
 
template<typename T >
std::string FormatArray (const T *data, size_t count, const char *format, int numCols)
 
template<typename T >
std::string FormatArray (const std::vector< T > &data, const char *format, int numCols)
 
template<typename T , typename Op >
std::string FormatArrayOp (const std::vector< T > &data, Op op, int numCols)
 
template<typename T >
void PrintArray (const T *data, size_t count, const char *format, int numCols)
 
template<typename T >
void PrintArray (const std::vector< T > &data, const char *format, int numCols)
 
template<typename T , typename Op >
void PrintArrayOp (const std::vector< T > &data, Op op, int numCols)
 
template<typename T >
void copyDtoH (T *dest, const T *source, int count)
 
template<typename T >
void copyDtoD (T *dest, const T *source, int count, cudaStream_t stream=0)
 
template<typename T >
void copyDtoH (std::vector< T > &dest, const T *source, int count)
 
template<typename T >
void copyHtoD (T *dest, const T *source, int count)
 
template<typename T >
void copyHtoD (T *dest, const std::vector< T > &source)
 
ContextPtr CreateCudaDevice (int ordinal)
 
ContextPtr CreateCudaDevice (int argc, char **argv, bool printInfo=false)
 
ContextPtr CreateCudaDeviceStream (int ordinal)
 
ContextPtr CreateCudaDeviceStream (int argc, char **argv, bool printInfo=false)
 
ContextPtr CreateCudaDeviceAttachStream (cudaStream_t stream)
 
ContextPtr CreateCudaDeviceAttachStream (int ordinal, cudaStream_t stream)
 
template<typename T >
 MGPU_MEM (T) CudaMemSupport
 
template<typename T , typename Func >
 MGPU_MEM (T) CudaMemSupport
 
template<typename T , typename Op >
std::string FormatArrayOp (const CudaDeviceMem< T > &mem, int count, Op op, int numCols)
 
template<typename T , typename Op >
std::string FormatArrayOp (const CudaDeviceMem< T > &mem, Op op, int numCols)
 
template<typename T >
void PrintArray (const CudaDeviceMem< T > &mem, int count, const char *format, int numCols)
 
template<typename T >
void PrintArray (const CudaDeviceMem< T > &mem, const char *format, int numCols)
 
template<typename T , typename Op >
void PrintArrayOp (const CudaDeviceMem< T > &mem, Op op, int numCols)
 
int Rand (int min, int max)
 
int64 Rand (int64 min, int64 max)
 
uint Rand (uint min, uint max)
 
uint64 Rand (uint64 min, uint64 max)
 
float Rand (float min, float max)
 
double Rand (double min, double max)
 
long intrusive_ptr_add_ref (CudaBase *base)
 
void intrusive_ptr_release (CudaBase *base)
 

Variables

MGPU_RAND_NS::mt19937 mt19937
 

Typedef Documentation

Definition at line 55 of file mgpucontext.h.

typedef unsigned char mgpu::byte

Definition at line 70 of file static.h.

Definition at line 11 of file mgpualloc.h.

typedef signed short mgpu::int16

Definition at line 73 of file static.h.

typedef long long mgpu::int64

Definition at line 78 of file static.h.

typedef unsigned int mgpu::uint

Definition at line 72 of file static.h.

typedef unsigned short mgpu::uint16

Definition at line 76 of file static.h.

typedef unsigned long long mgpu::uint64

Definition at line 79 of file static.h.

typedef unsigned short mgpu::ushort

Definition at line 75 of file static.h.

Enumeration Type Documentation

Enumerator
MgpuBoundsLower 
MgpuBoundsUpper 

Definition at line 39 of file mgpuenums.h.

Enumerator
MgpuJoinKindInner 
MgpuJoinKindLeft 
MgpuJoinKindRight 
MgpuJoinKindOuter 

Definition at line 56 of file mgpuenums.h.

Enumerator
MgpuScanTypeExc 
MgpuScanTypeInc 

Definition at line 44 of file mgpuenums.h.

Enumerator
MgpuSearchTypeNone 
MgpuSearchTypeIndex 
MgpuSearchTypeMatch 
MgpuSearchTypeIndexMatch 

Definition at line 49 of file mgpuenums.h.

Enumerator
MgpuSetOpIntersection 
MgpuSetOpUnion 
MgpuSetOpDiff 
MgpuSetOpSymDiff 

Definition at line 63 of file mgpuenums.h.

Function Documentation

template<typename T >
void mgpu::CompareVecs ( const T *  test,
const T *  ref,
int  count 
)

Definition at line 78 of file sparsematrix.h.

void mgpu::ComputeColRanges ( const SparseMatrix &  A,
const SparseMatrix &  B,
int *  colMin,
int *  colMax 
)

Definition at line 307 of file sparsematrix.cpp.

MatrixStats mgpu::ComputeMatrixStats ( const SparseMatrix &  m)

Definition at line 222 of file sparsematrix.cpp.

int64 mgpu::ComputeProductCount ( const SparseMatrix &  A,
const SparseMatrix &  B 
)

Definition at line 296 of file sparsematrix.cpp.

template<typename T >
void mgpu::copyDtoD ( T *  dest,
const T *  source,
int  count,
cudaStream_t  stream = 0 
)

Definition at line 29 of file mgpucontext.h.

template<typename T >
void mgpu::copyDtoH ( T *  dest,
const T *  source,
int  count 
)

Definition at line 25 of file mgpucontext.h.

template<typename T >
void mgpu::copyDtoH ( std::vector< T > &  dest,
const T *  source,
int  count 
)

Definition at line 34 of file mgpucontext.h.

template<typename T >
void mgpu::copyHtoD ( T *  dest,
const T *  source,
int  count 
)

Definition at line 41 of file mgpucontext.h.

template<typename T >
void mgpu::copyHtoD ( T *  dest,
const std::vector< T > &  source 
)

Definition at line 45 of file mgpucontext.h.

ContextPtr mgpu::CreateCudaDevice ( int  ordinal)
ContextPtr mgpu::CreateCudaDevice ( int  argc,
char **  argv,
bool  printInfo = false 
)
ContextPtr mgpu::CreateCudaDeviceAttachStream ( cudaStream_t  stream)
ContextPtr mgpu::CreateCudaDeviceAttachStream ( int  ordinal,
cudaStream_t  stream 
)
ContextPtr mgpu::CreateCudaDeviceStream ( int  ordinal)
ContextPtr mgpu::CreateCudaDeviceStream ( int  argc,
char **  argv,
bool  printInfo = false 
)
template<typename T >
std::string mgpu::FormatArray ( const T *  data,
size_t  count,
const char *  format,
int  numCols 
)

Definition at line 112 of file format.h.

template<typename T >
std::string mgpu::FormatArray ( const std::vector< T > &  data,
const char *  format,
int  numCols 
)

Definition at line 118 of file format.h.

template<typename T , typename Op >
std::string mgpu::FormatArrayOp ( const T *  data,
size_t  count,
Op  op,
int  numCols 
)

Definition at line 95 of file format.h.

template<typename T , typename Op >
std::string mgpu::FormatArrayOp ( const std::vector< T > &  data,
Op  op,
int  numCols 
)

Definition at line 123 of file format.h.

template<typename T , typename Op >
std::string mgpu::FormatArrayOp ( const CudaDeviceMem< T > &  mem,
int  count,
Op  op,
int  numCols 
)

Definition at line 480 of file mgpucontext.h.

template<typename T , typename Op >
std::string mgpu::FormatArrayOp ( const CudaDeviceMem< T > &  mem,
Op  op,
int  numCols 
)

Definition at line 488 of file mgpucontext.h.

std::string mgpu::FormatInteger ( int64  x)

Definition at line 70 of file mgpuutil.cpp.

long mgpu::intrusive_ptr_add_ref ( CudaBase *  base)
inline

Definition at line 78 of file util.h.

void mgpu::intrusive_ptr_release ( CudaBase *  base)
inline

Definition at line 82 of file util.h.

bool mgpu::LoadBinaryMatrix ( const char *  filename,
std::auto_ptr< SparseMatrix > *  ppMatrix 
)

Definition at line 158 of file sparsematrix.cpp.

bool mgpu::LoadCachedMatrix ( const char *  filename,
std::auto_ptr< SparseMatrix > *  ppMatrix,
std::string &  err 
)

Definition at line 200 of file sparsematrix.cpp.

template<typename T >
mgpu::MGPU_MEM ( )

Definition at line 403 of file mgpucontext.h.

template<typename T , typename Func >
mgpu::MGPU_MEM ( )

Definition at line 466 of file mgpucontext.h.

int64 mgpu::MulSparseMatrices ( const SparseMatrix &  A,
const SparseMatrix &  B,
std::auto_ptr< SparseMatrix > *  ppC 
)

Definition at line 253 of file sparsematrix.cpp.

template<typename T >
void mgpu::PrintArray ( const T *  data,
size_t  count,
const char *  format,
int  numCols 
)

Definition at line 128 of file format.h.

template<typename T >
void mgpu::PrintArray ( const std::vector< T > &  data,
const char *  format,
int  numCols 
)

Definition at line 134 of file format.h.

template<typename T >
void mgpu::PrintArray ( const CudaDeviceMem< T > &  mem,
int  count,
const char *  format,
int  numCols 
)

Definition at line 493 of file mgpucontext.h.

template<typename T >
void mgpu::PrintArray ( const CudaDeviceMem< T > &  mem,
const char *  format,
int  numCols 
)

Definition at line 500 of file mgpucontext.h.

template<typename T , typename Op >
void mgpu::PrintArrayOp ( const std::vector< T > &  data,
Op  op,
int  numCols 
)

Definition at line 140 of file format.h.

template<typename T , typename Op >
void mgpu::PrintArrayOp ( const CudaDeviceMem< T > &  mem,
Op  op,
int  numCols 
)

Definition at line 504 of file mgpucontext.h.

int mgpu::Rand ( int  min,
int  max 
)

Definition at line 145 of file mgpuutil.cpp.

int64 mgpu::Rand ( int64  min,
int64  max 
)

Definition at line 149 of file mgpuutil.cpp.

uint mgpu::Rand ( uint  min,
uint  max 
)

Definition at line 153 of file mgpuutil.cpp.

uint64 mgpu::Rand ( uint64  min,
uint64  max 
)

Definition at line 157 of file mgpuutil.cpp.

float mgpu::Rand ( float  min,
float  max 
)

Definition at line 161 of file mgpuutil.cpp.

double mgpu::Rand ( double  min,
double  max 
)

Definition at line 165 of file mgpuutil.cpp.

bool mgpu::ReadSparseMatrix ( FILE *  f,
std::auto_ptr< SparseMatrix > *  ppMatrix,
std::string &  err 
)

Definition at line 53 of file sparsematrix.cpp.

bool mgpu::ReadSparseMatrix ( const char *  filename,
std::auto_ptr< SparseMatrix > *  ppMatrix,
std::string &  err 
)

Definition at line 143 of file sparsematrix.cpp.

template<typename T >
void mgpu::SpmvTest ( const SparseMatrix &  m,
T *  results 
)

Definition at line 64 of file sparsematrix.h.

bool mgpu::StoreBinaryMatrix ( const char *  filename,
const SparseMatrix &  matrix 
)

Definition at line 183 of file sparsematrix.cpp.

std::string mgpu::stringprintf ( const char *  format,
  ... 
)

Definition at line 53 of file mgpuutil.cpp.

template<typename T >
const char* mgpu::TypeIdName ( )

Definition at line 55 of file format.h.

const char * mgpu::TypeIdString ( const std::type_info &  ti)

Definition at line 135 of file mgpuutil.cpp.

Variable Documentation

MGPU_RAND_NS::mt19937 mgpu::mt19937

Definition at line 143 of file mgpuutil.cpp.