Class NPPNativeMethods.NPPCore
nppcore.h
Inheritance
Inherited Members
Namespace: ManagedCuda.NPP
Assembly: NPP.dll
Syntax
public static class NPPCore
Methods
nppGetGpuComputeCapability()
What CUDA compute model is supported by the default CUDA device?
Before trying to call any NPP functions, the user should make a call this function to ensure that the current machine has a CUDA capable device.
Declaration
public static GpuComputeCapability nppGetGpuComputeCapability()
Returns
Type | Description |
---|---|
GpuComputeCapability | An enum value representing if a CUDA capable device was found and what level of compute capabilities it supports. |
nppGetGpuDeviceProperties(ref Int32, ref Int32, ref Int32)
Get the maximum number of threads per SM, maximum threads per block, and number of SMs for the active GPU
Declaration
public static int nppGetGpuDeviceProperties(ref int pMaxThreadsPerSM, ref int pMaxThreadsPerBlock, ref int pNumberOfSMs)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pMaxThreadsPerSM | |
System.Int32 | pMaxThreadsPerBlock | |
System.Int32 | pNumberOfSMs |
Returns
Type | Description |
---|---|
System.Int32 | cudaSuccess for success, -1 for failure. |
nppGetGpuName()
Get the name of the default CUDA device.
Declaration
public static string nppGetGpuName()
Returns
Type | Description |
---|---|
System.String | Name string of the graphics-card/compute device in a system. |
nppGetGpuNumSMs()
Get the number of Streaming Multiprocessors (SM) on the default CUDA device.
Declaration
public static int nppGetGpuNumSMs()
Returns
Type | Description |
---|---|
System.Int32 | Number of SMs of the default CUDA device. |
nppGetLibVersion()
Get the NPP library version.
Declaration
public static NppLibraryVersion nppGetLibVersion()
Returns
Type | Description |
---|---|
NppLibraryVersion | A struct containing separate values for major and minor revision and build number. |
nppGetMaxThreadsPerBlock()
Get the maximum number of threads per block on the default CUDA device.
Declaration
public static int nppGetMaxThreadsPerBlock()
Returns
Type | Description |
---|---|
System.Int32 | Maximum number of threads per block on the default CUDA device. |
nppGetMaxThreadsPerSM()
Get the maximum number of threads per SM for the active GPU
Declaration
public static int nppGetMaxThreadsPerSM()
Returns
Type | Description |
---|---|
System.Int32 | Maximum number of threads per SM for the active GPU. |
nppGetStream()
Get the NPP CUDA stream.
NPP enables concurrent device tasks via a global stream state varible. The NPP stream by default is set to stream 0, i.e. non-concurrent mode. A user can set the NPP stream to any valid CUDA stream. All CUDA commands issued by NPP (e.g. kernels launched by the NPP library) are then issed to that NPP stream.
Declaration
public static CUstream nppGetStream()
Returns
Type | Description |
---|---|
CUstream |
nppGetStreamMaxThreadsPerSM()
Get the maximum number of threads per SM on the device associated with the current NPP CUDA stream. NPP enables concurrent device tasks via a global stream state varible. The NPP stream by default is set to stream 0, i.e. non-concurrent mode. A user can set the NPP stream to any valid CUDA stream. All CUDA commands issued by NPP (e.g. kernels launched by the NPP library) are then issed to that NPP stream. This call avoids a cudaGetDeviceProperties() call.
Declaration
public static uint nppGetStreamMaxThreadsPerSM()
Returns
Type | Description |
---|---|
System.UInt32 |
nppGetStreamNumSMs()
Get the number of SMs on the device associated with the current NPP CUDA stream. NPP enables concurrent device tasks via a global stream state varible. The NPP stream by default is set to stream 0, i.e. non-concurrent mode. A user can set the NPP stream to any valid CUDA stream. All CUDA commands issued by NPP (e.g. kernels launched by the NPP library) are then issed to that NPP stream. This call avoids a cudaGetDeviceProperties() call.
Declaration
public static uint nppGetStreamNumSMs()
Returns
Type | Description |
---|---|
System.UInt32 |
nppSetStream(CUstream)
Set the NPP CUDA stream.
Declaration
public static void nppSetStream(CUstream hStream)
Parameters
Type | Name | Description |
---|---|---|
CUstream | hStream |