omni/graph/exec/unstable/NodeDef.h
File members: omni/graph/exec/unstable/NodeDef.h
// 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.
//
#pragma once
#include <omni/graph/exec/unstable/Assert.h>
#include <omni/graph/exec/unstable/INodeDef.h>
namespace omni
{
namespace graph
{
namespace exec
{
namespace unstable
{
template <typename... Bases>
class NodeDefT : public Implements<Bases...>
{
public:
static omni::core::ObjectPtr<NodeDefT> create(const carb::cpp::string_view& definitionName) noexcept
{
OMNI_GRAPH_EXEC_ASSERT(definitionName.data());
return omni::core::steal(new NodeDefT(definitionName));
}
protected:
Status execute_abi(ExecutionTask* info) noexcept override
{
return Status::eSuccess;
}
SchedulingInfo getSchedulingInfo_abi(const ExecutionTask* info) noexcept override
{
return SchedulingInfo::eSerial;
}
const ConstName* getName_abi() noexcept override
{
return &m_name;
}
NodeDefT(const carb::cpp::string_view& definitionName) noexcept : m_name{ definitionName }
{
}
private:
ConstName m_name;
};
using NodeDef = NodeDefT<INodeDef>;
} // namespace unstable
} // namespace exec
} // namespace graph
} // namespace omni