View Source Evision.CUDA (Evision v0.1.22)
Link to this section Summary
Types
Type that represents an Evision.CUDA
struct.
Functions
Creates a continuous matrix.
Creates a continuous matrix.
Ensures that the size of a matrix is big enough and the matrix has a proper type.
Ensures that the size of a matrix is big enough and the matrix has a proper type.
Returns the number of installed CUDA-enabled devices.
Returns the current device index set by cuda::setDevice or initialized by default.
printCudaDeviceInfo
printShortCudaDeviceInfo
Page-locks the memory of matrix and maps it for the device(s).
Explicitly destroys and cleans up all resources associated with the current device in the current process.
setBufferPoolConfig
setBufferPoolUsage
Sets a device and initializes it for the current thread.
Unmaps the memory of matrix and makes it pageable again.
Link to this section Types
@type t() :: %Evision.CUDA{ref: reference()}
Type that represents an Evision.CUDA
struct.
ref.
reference()
The underlying erlang resource variable.
Link to this section Functions
@spec createContinuous(integer(), integer(), integer()) :: Evision.Mat.t() | {:error, String.t()}
Creates a continuous matrix.
Positional Arguments
rows:
int
.Row count.
cols:
int
.Column count.
type:
int
.Type of the matrix.
Return
arr:
Evision.Mat
.Destination matrix. This parameter changes only if it has a proper type and area ( \f$\texttt{rows} \times \texttt{cols}\f$ ).
Matrix is called continuous if its elements are stored continuously, that is, without gaps at the end of each row.
Python prototype (for reference only):
createContinuous(rows, cols, type[, arr]) -> arr
@spec createContinuous(integer(), integer(), integer(), [{atom(), term()}, ...] | nil) :: Evision.Mat.t() | {:error, String.t()}
Creates a continuous matrix.
Positional Arguments
rows:
int
.Row count.
cols:
int
.Column count.
type:
int
.Type of the matrix.
Return
arr:
Evision.Mat
.Destination matrix. This parameter changes only if it has a proper type and area ( \f$\texttt{rows} \times \texttt{cols}\f$ ).
Matrix is called continuous if its elements are stored continuously, that is, without gaps at the end of each row.
Python prototype (for reference only):
createContinuous(rows, cols, type[, arr]) -> arr
@spec ensureSizeIsEnough(integer(), integer(), integer()) :: Evision.Mat.t() | {:error, String.t()}
Ensures that the size of a matrix is big enough and the matrix has a proper type.
Positional Arguments
rows:
int
.Minimum desired number of rows.
cols:
int
.Minimum desired number of columns.
type:
int
.Desired matrix type.
Return
arr:
Evision.Mat
.Destination matrix.
The function does not reallocate memory if the matrix has proper attributes already.
Python prototype (for reference only):
ensureSizeIsEnough(rows, cols, type[, arr]) -> arr
@spec ensureSizeIsEnough( integer(), integer(), integer(), [{atom(), term()}, ...] | nil ) :: Evision.Mat.t() | {:error, String.t()}
Ensures that the size of a matrix is big enough and the matrix has a proper type.
Positional Arguments
rows:
int
.Minimum desired number of rows.
cols:
int
.Minimum desired number of columns.
type:
int
.Desired matrix type.
Return
arr:
Evision.Mat
.Destination matrix.
The function does not reallocate memory if the matrix has proper attributes already.
Python prototype (for reference only):
ensureSizeIsEnough(rows, cols, type[, arr]) -> arr
Returns the number of installed CUDA-enabled devices.
Return
- retval:
int
Use this function before any other CUDA functions calls. If OpenCV is compiled without CUDA support, this function returns 0. If the CUDA driver is not installed, or is incompatible, this function returns -1.
Python prototype (for reference only):
getCudaEnabledDeviceCount() -> retval
Returns the current device index set by cuda::setDevice or initialized by default.
Return
- retval:
int
Python prototype (for reference only):
getDevice() -> retval
printCudaDeviceInfo
Positional Arguments
- device:
int
Python prototype (for reference only):
printCudaDeviceInfo(device) -> None
printShortCudaDeviceInfo
Positional Arguments
- device:
int
Python prototype (for reference only):
printShortCudaDeviceInfo(device) -> None
@spec registerPageLocked(Evision.Mat.maybe_mat_in()) :: :ok | {:error, String.t()}
Page-locks the memory of matrix and maps it for the device(s).
Positional Arguments
m:
Evision.Mat
.Input matrix.
Python prototype (for reference only):
registerPageLocked(m) -> None
@spec resetDevice() :: :ok | {:error, String.t()}
Explicitly destroys and cleans up all resources associated with the current device in the current process.
Any subsequent API call to this device will reinitialize the device.
Python prototype (for reference only):
resetDevice() -> None
setBufferPoolConfig
Positional Arguments
- deviceId:
int
- stackSize:
size_t
- stackCount:
int
Python prototype (for reference only):
setBufferPoolConfig(deviceId, stackSize, stackCount) -> None
setBufferPoolUsage
Positional Arguments
- on:
bool
Python prototype (for reference only):
setBufferPoolUsage(on) -> None
Sets a device and initializes it for the current thread.
Positional Arguments
device:
int
.System index of a CUDA device starting with 0.
If the call of this function is omitted, a default device is initialized at the fist CUDA usage.
Python prototype (for reference only):
setDevice(device) -> None
@spec unregisterPageLocked(Evision.Mat.maybe_mat_in()) :: :ok | {:error, String.t()}
Unmaps the memory of matrix and makes it pageable again.
Positional Arguments
m:
Evision.Mat
.Input matrix.
Python prototype (for reference only):
unregisterPageLocked(m) -> None