omni/graph/exec/unstable/Types.h

File members: omni/graph/exec/unstable/Types.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/EnumBitops.h>

#include <cstdint>
#include <limits>

namespace omni
{
namespace graph
{

namespace exec
{

namespace unstable
{

using NodeIndexInTopology = uint64_t;

using NameHash = uint64_t;

using ExecutionPathHash = uint64_t;

using NodeDataKey = uint64_t;

using PassPriority = uint32_t;

constexpr const uint64_t kInvalidNodeIndexInTopology = std::numeric_limits<uint64_t>::max();
static_assert(std::numeric_limits<uint64_t>::max() == 0xFFFFFFFFFFFFFFFF, "unexpected uin64_t max value");

enum class PassType
{
    ePopulate,
    ePartitioning,
    eGlobal,
    eTypeInference,
    eOverrideExecution,
    eScheduling,
    eCount
};

enum class PassPipelineStatus : uint32_t
{
    eNone = 0,
    eExecuting = 1 << 0,
    eTopologyChangesAllowed = 1 << 1,
};

template <>
struct EnumBitops<PassPipelineStatus> : EnumBitops<>::allow_bitops
{
};

enum class BackgroundResultStatus
{
    eReady,
    eTimeout,
};

using NodeDataDeleterFn = void(void*);

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