CudaContext
Contains information on a CUDA context.
This class allows defining the execution context for CUDA functions. For more information,
refer to the
CUDA documentation.
- The device ID determines the NVIDIA card used by the CUDA functions.
- The CUDA stream determines the stream used by the CUDA functions.
If this parameter is null, the ImageDev/CUDA algorithms will use their own stream.
Syntax
Method |
Description |
Ptr New( int cudaDeviceId = 0, const bool initStream = true )
|
Constructor returning a new CUDA Context.
- cudaDeviceId: Device ID of an NVIDIA card.
- initStream: Indicates if the CUDA stream should be initialized or set to null.
|
int cudaDeviceId() const
|
Gets the device ID. |
void setCudaDeviceId( int newCudaDeviceId )
|
Sets the device ID.
- newCudaDeviceId: Device ID of an NVIDIA card.
|
void* cudaStream() const
|
Gets the CUDA stream. |
void setCudaStream( void* newCudaStream )
|
Sets the CUDA stream.
- newCudaStream: New CUDA stream.
|
Method |
Description |
CudaContext(cuda_device_id: ctypes.c_int32 = 0, init_stream: bool = True)
|
Constructor returning a new CUDA Context.
- cuda_device_id: Device ID of an NVIDIA card.
- init_stream: Indicates if the CUDA stream should be initialized or defined to null.
|
Attributes |
Description |
device_id -> Int32
|
Device ID of an NVIDIA card. |
cuda_stream -> ctypes.c_void_p
|
A CUDA stream. |
Method |
Description |
CudaContext(Int32 cudaDeviceId = 0, bool initStream = true)
|
Constructor returning a new CUDA Context.
- cudaDeviceId: Device ID of an NVIDIA card.
- initStream: Indicates if the CUDA stream should be initialized or defined to null.
|
Attributes |
Description |
CudaDeviceId -> Int32
|
Device ID of an NVIDIA card. |
CudaStream -> IntPtr
|
A CUDA stream. |