Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved ie_thread_affinity.hpp to private API #5554

Merged
merged 1 commit into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ using cpu_set_t = void;
*
* @param mask The mask
*/
INFERENCE_ENGINE_API_CPP(void) ReleaseProcessMask(cpu_set_t* mask);
void ReleaseProcessMask(cpu_set_t* mask);

/**
* @brief Deleter for process mask
* @ingroup ie_dev_api_threading
*/
struct ReleaseProcessMaskDeleter {
/**
* @brief A callable operator to release object
*
* @param mask The mask to release
*/
/**
* @brief A callable operator to release object
*
* @param mask The mask to release
*/
void operator()(cpu_set_t* mask) const {
ReleaseProcessMask(mask);
}
Expand All @@ -52,7 +52,7 @@ using CpuSet = std::unique_ptr<cpu_set_t, ReleaseProcessMaskDeleter>;
* @ingroup ie_dev_api_threading
* @return A core affinity mask
*/
INFERENCE_ENGINE_API_CPP(std::tuple<CpuSet, int>) GetProcessMask();
std::tuple<CpuSet, int> GetProcessMask();

/**
* @brief Pins current thread to a set of cores determined by the mask
Expand All @@ -64,18 +64,18 @@ INFERENCE_ENGINE_API_CPP(std::tuple<CpuSet, int>) GetProcessMask();
* @param[in] processMask The process mask
* @return `True` in case of success, `false` otherwise
*/
INFERENCE_ENGINE_API_CPP(bool) PinThreadToVacantCore(int thrIdx, int hyperThreads, int ncores, const CpuSet& processMask);
bool PinThreadToVacantCore(int thrIdx, int hyperThreads, int ncores, const CpuSet& processMask);

/**
* @brief Pins thread to a spare core in the round-robin scheme, while respecting the given process mask.
* The function can also handle the hyper-threading (by populating the physical cores first)
* The function can also handle the hyper-threading (by populating the physical cores first)
* @ingroup ie_dev_api_threading
*
* @param[in] ncores The ncores
* @param[in] processMask The process mask
* @return `True` in case of success, `false` otherwise
*/
INFERENCE_ENGINE_API_CPP(bool) PinCurrentThreadByMask(int ncores, const CpuSet& processMask);
bool PinCurrentThreadByMask(int ncores, const CpuSet& processMask);

/**
* @brief Pins a current thread to a socket.
Expand All @@ -84,5 +84,5 @@ INFERENCE_ENGINE_API_CPP(bool) PinCurrentThreadByMask(int ncores, const CpuSet&
* @param[in] socket The socket id
* @return `True` in case of success, `false` otherwise
*/
INFERENCE_ENGINE_API_CPP(bool) PinCurrentThreadToSocket(int socket);
bool PinCurrentThreadToSocket(int socket);
} // namespace InferenceEngine
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include <threading/ie_cpu_streams_executor.hpp>
#include <ie_system_conf.h>
#include <threading/ie_thread_affinity.hpp>
#include <algorithm>
#include <unordered_set>
#include <utility>
Expand Down