CUDPP  2.1
CUDA Data-Parallel Primitives Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
SharedMemory< T > Struct Template Reference

Wrapper class for templatized dynamic shared memory arrays. More...

#include <sharedmem.h>

Public Member Functions

__device__ T * getPointer ()
 Return a pointer to the runtime-sized shared memory array. More...
 

Detailed Description

template<typename T>
struct SharedMemory< T >

Wrapper class for templatized dynamic shared memory arrays.

This struct uses template specialization on the type T to declare a differently named dynamic shared memory array for each type (

extern __shared__ T s_type[]

).

Currently there are specializations for the following types: int, uint, char, uchar, short, ushort, long, unsigned long, bool, float, and double. One can also specialize it for user defined types.

Member Function Documentation

template<typename T >
__device__ T* SharedMemory< T >::getPointer ( )
inline

Return a pointer to the runtime-sized shared memory array.

Returns
Pointer to runtime-sized shared memory array

The documentation for this struct was generated from the following file: