| Cv2GetNumThreads Method |
Returns the number of threads used by OpenCV for parallel regions.
Always returns 1 if OpenCV is built without threading support.
The exact meaning of return value depends on the threading framework used by OpenCV library:
- `TBB` - The number of threads, that OpenCV will try to use for parallel regions. If there is
any tbb::thread_scheduler_init in user code conflicting with OpenCV, then function returns default
number of threads used by TBB library.
- `OpenMP` - An upper bound on the number of threads that could be used to form a new team.
- `Concurrency` - The number of threads, that OpenCV will try to use for parallel regions.
- `GCD` - Unsupported; returns the GCD thread pool limit(512) for compatibility.
- `C=` - The number of threads, that OpenCV will try to use for parallel regions, if before
called setNumThreads with threads > 0, otherwise returns the number of logical CPUs,
available for the process.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static int GetNumThreads()
Public Shared Function GetNumThreads As Integer
public:
static int GetNumThreads()
static member GetNumThreads : unit -> int
Return Value
Type:
Int32[Missing <returns> documentation for "M:OpenCvSharp.Cv2.GetNumThreads"]
See Also