Program Listing for File gxf_executor.hpp
↰ Return to documentation for file (include/holoscan/core/executors/gxf/gxf_executor.hpp
)
/*
* SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HOLOSCAN_CORE_EXECUTORS_GXF_GXF_EXECUTOR_HPP
#define HOLOSCAN_CORE_EXECUTORS_GXF_GXF_EXECUTOR_HPP
#include <gxf/core/gxf.h>
#include <string>
#include <memory>
#include <set>
#include <vector>
#include <functional>
#include "../../executor.hpp"
namespace holoscan::gxf {
class GXFExecutor : public holoscan::Executor {
public:
GXFExecutor() = delete;
explicit GXFExecutor(holoscan::Fragment* app);
~GXFExecutor() override;
void run(Graph& graph) override;
static void create_input_port(Fragment* fragment, gxf_context_t gxf_context, gxf_uid_t eid,
IOSpec* io_spec);
static void create_output_port(Fragment* fragment, gxf_context_t gxf_context, gxf_uid_t eid,
IOSpec* io_spec);
protected:
bool initialize_operator(Operator* op) override;
bool add_receivers(const std::shared_ptr<Operator>& op, const std::string& receivers_name,
std::set<std::string, std::less<>>& input_labels,
std::vector<holoscan::IOSpec*>& iospec_vector) override;
private:
void register_extensions();
};
} // namespace holoscan::gxf
#endif/* HOLOSCAN_CORE_EXECUTORS_GXF_GXF_EXECUTOR_HPP */