// Copyright (c) 2022-2023, 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.
//

//! @file IScheduleFunction.h
//!
//! @brief Defines @ref omni::graph::exec::unstable::IScheduleFunction.
#pragma once

#include <omni/graph/exec/unstable/IBase.h>
#include <omni/graph/exec/unstable/SchedulingInfo.h>
#include <omni/graph/exec/unstable/Status.h>

namespace omni
{
namespace graph
{
namespace exec
{
namespace unstable
{

class IScheduleFunction_abi;
class IScheduleFunction;
template <typename T>
class ScheduleFunction;

//! Interface wrapping a function (possibly with storage). Used to wrap a task when passing generated work to the
//! scheduler.
class IScheduleFunction_abi : public omni::core::Inherits<omni::graph::exec::unstable::IBase,
                                                          OMNI_TYPE_ID("omni.graph.exec.unstable.IScheduleFunction")>
{
protected:
    //! Main execute method. Returning status of the execution.
    virtual Status invoke_abi() noexcept = 0;
};

} // namespace unstable
} // namespace exec
} // namespace graph
} // namespace omni

#define OMNI_BIND_INCLUDE_INTERFACE_DECL
#include <omni/graph/exec/unstable/IScheduleFunction.gen.h>

//! @copydoc omni::graph::exec::unstable::IScheduleFunction_abi
//!
//! @ingroup groupOmniGraphExecInterfaces
class omni::graph::exec::unstable::IScheduleFunction
    : public omni::core::Generated<omni::graph::exec::unstable::IScheduleFunction_abi>
{
};

#define OMNI_BIND_INCLUDE_INTERFACE_IMPL
#include <omni/graph/exec/unstable/IScheduleFunction.gen.h>
