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
37WORK_API bool WorkHasConcurrency();
38
44
56WORK_API void WorkSetConcurrencyLimit(unsigned n);
57
75
83
84PXR_NAMESPACE_CLOSE_SCOPE
85
86#endif
WORK_API void WorkSetConcurrencyLimitArgument(int n)
Sanitize n as described below and set the concurrency limit accordingly.
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 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_...