omni/experimental/job/IJob.gen.h
File members: omni/experimental/job/IJob.gen.h
// Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
// --------- Warning: This is a build system generated file. ----------
//
#include <omni/core/OmniAttr.h>
#include <omni/core/Interface.h>
#include <omni/core/ResultError.h>
#include <functional>
#include <utility>
#include <type_traits>
#ifndef OMNI_BIND_INCLUDE_INTERFACE_IMPL
template <>
class omni::core::Generated<omni::experimental::job::IAffinityMask_abi> : public omni::experimental::job::IAffinityMask_abi
{
public:
OMNI_PLUGIN_INTERFACE("omni::experimental::job::IAffinityMask")
omni::experimental::job::MaskType get_affinity_mask(size_t index) noexcept;
void set_affinity_mask(size_t index, omni::experimental::job::MaskType mask) noexcept;
size_t get_mask_count() noexcept;
size_t get_default_mask_count() noexcept;
void set_mask_count(size_t count) noexcept;
};
template <>
class omni::core::Generated<omni::experimental::job::IJob_abi> : public omni::experimental::job::IJob_abi
{
public:
OMNI_PLUGIN_INTERFACE("omni::experimental::job::IJob")
void enqueue_job(omni::experimental::job::JobFunction job_fn, void* job_data) noexcept;
};
template <>
class omni::core::Generated<omni::experimental::job::IJobWorker_abi> : public omni::experimental::job::IJobWorker_abi
{
public:
OMNI_PLUGIN_INTERFACE("omni::experimental::job::IJobWorker")
size_t get_default_worker_count() noexcept;
size_t get_worker_count() noexcept;
void set_worker_count(size_t count) noexcept;
};
template <>
class omni::core::Generated<omni::experimental::job::IJobAffinity_abi> : public omni::experimental::job::IJobAffinity_abi
{
public:
OMNI_PLUGIN_INTERFACE("omni::experimental::job::IJobAffinity")
omni::core::ObjectPtr<omni::experimental::job::IAffinityMask> get_affinity(size_t worker_id) noexcept;
bool set_affinity(size_t worker_id, omni::core::ObjectParam<omni::experimental::job::IAffinityMask> mask) noexcept;
};
#endif
#ifndef OMNI_BIND_INCLUDE_INTERFACE_DECL
inline omni::experimental::job::MaskType omni::core::Generated<omni::experimental::job::IAffinityMask_abi>::get_affinity_mask(
size_t index) noexcept
{
return get_affinity_mask_abi(index);
}
inline void omni::core::Generated<omni::experimental::job::IAffinityMask_abi>::set_affinity_mask(
size_t index, omni::experimental::job::MaskType mask) noexcept
{
set_affinity_mask_abi(index, mask);
}
inline size_t omni::core::Generated<omni::experimental::job::IAffinityMask_abi>::get_mask_count() noexcept
{
return get_mask_count_abi();
}
inline size_t omni::core::Generated<omni::experimental::job::IAffinityMask_abi>::get_default_mask_count() noexcept
{
return get_default_mask_count_abi();
}
inline void omni::core::Generated<omni::experimental::job::IAffinityMask_abi>::set_mask_count(size_t count) noexcept
{
set_mask_count_abi(count);
}
inline void omni::core::Generated<omni::experimental::job::IJob_abi>::enqueue_job(
omni::experimental::job::JobFunction job_fn, void* job_data) noexcept
{
enqueue_job_abi(job_fn, job_data);
}
inline size_t omni::core::Generated<omni::experimental::job::IJobWorker_abi>::get_default_worker_count() noexcept
{
return get_default_worker_count_abi();
}
inline size_t omni::core::Generated<omni::experimental::job::IJobWorker_abi>::get_worker_count() noexcept
{
return get_worker_count_abi();
}
inline void omni::core::Generated<omni::experimental::job::IJobWorker_abi>::set_worker_count(size_t count) noexcept
{
set_worker_count_abi(count);
}
inline omni::core::ObjectPtr<omni::experimental::job::IAffinityMask> omni::core::Generated<
omni::experimental::job::IJobAffinity_abi>::get_affinity(size_t worker_id) noexcept
{
return omni::core::steal(get_affinity_abi(worker_id));
}
inline bool omni::core::Generated<omni::experimental::job::IJobAffinity_abi>::set_affinity(
size_t worker_id, omni::core::ObjectParam<omni::experimental::job::IAffinityMask> mask) noexcept
{
return set_affinity_abi(worker_id, mask.get());
}
#endif
#undef OMNI_BIND_INCLUDE_INTERFACE_DECL
#undef OMNI_BIND_INCLUDE_INTERFACE_IMPL