Loading...
Searching...
No Matches
threadLimits.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_BASE_WORK_THREAD_LIMITS_H
8#define PXR_BASE_WORK_THREAD_LIMITS_H
9
10#include "pxr/pxr.h"
11#include "pxr/base/work/api.h"
12
13PXR_NAMESPACE_OPEN_SCOPE
14
16
31WORK_API unsigned WorkGetConcurrencyLimit();
32
39
44WORK_API bool WorkHasConcurrency();
45
51
63WORK_API void WorkSetConcurrencyLimit(unsigned n);
64
82
90
98
99PXR_NAMESPACE_CLOSE_SCOPE
100
101#endif
WORK_API void WorkSetConcurrencyLimitArgument(int n)
Sanitize n as described below and set the concurrency limit accordingly.
WORK_API bool WorkSupportsGranularThreadLimits()
Returns true if a limit between 1 and the physical concurrency can be set, and the implementation wil...
WORK_API unsigned WorkGetPhysicalConcurrencyLimit()
Return the number of physical execution cores available to the program.
WORK_API void WorkSetMaximumConcurrencyLimit()
Set the concurrency limit to be the maximum recommended for the hardware on which it's running.
WORK_API unsigned WorkGetConcurrencyLimit()
Return the current concurrency limit, always >= 1.
WORK_API unsigned WorkGetConcurrencyLimitSetting()
Return the concurrency limit setting, computed from the physical concurrency limit and the PXR_WORK_T...
WORK_API void WorkSetConcurrencyLimit(unsigned n)
Set the concurrency limit to n, if n is a non-zero value.
WORK_API bool WorkHasConcurrency()
Return true if WorkGetPhysicalConcurrencyLimit() returns a number greater than 1 and PXR_WORK_THREAD_...