NVIDIA Holoscan SDK v2.3.0
Holoscan v2.3.0

Program Listing for File gxf_codelet.hpp

Return to documentation for file (include/holoscan/operators/gxf_codelet/gxf_codelet.hpp)

Copy
Copied!
            

/* * SPDX-FileCopyrightText: Copyright (c) 2024 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_OPERATORS_GXF_CODELET_GXF_CODELET_HPP #define HOLOSCAN_OPERATORS_GXF_CODELET_GXF_CODELET_HPP #include "holoscan/core/gxf/gxf_operator.hpp" #include <list> #include <memory> #include <string> #include <unordered_map> #include <vector> #include <utility> #include "holoscan/core/gxf/gxf_component_info.hpp" #define HOLOSCAN_WRAP_GXF_CODELET_AS_OPERATOR(class_name, gxf_typename) \ class class_name : public ::holoscan::ops::GXFCodeletOp { \ public: \ HOLOSCAN_OPERATOR_FORWARD_TEMPLATE() \ explicit class_name(ArgT&& arg, ArgsT&&... args) \ : ::holoscan::ops::GXFCodeletOp(gxf_typename, std::forward<ArgT>(arg), \ std::forward<ArgsT>(args)...) {} \ class_name() : ::holoscan::ops::GXFCodeletOp(gxf_typename) {} \ }; namespace holoscan::ops { class GXFCodeletOp : public holoscan::ops::GXFOperator { public: template <typename... ArgsT> explicit GXFCodeletOp(const char* gxf_typename, ArgsT&&... args) : holoscan::ops::GXFOperator(std::forward<ArgsT>(args)...) { gxf_typename_ = gxf_typename; } GXFCodeletOp() = default; const char* gxf_typename() const override; void setup(OperatorSpec& spec) override; protected: void set_parameters() override; std::shared_ptr<gxf::ComponentInfo> gxf_component_info_; std::list<Parameter<void*>> parameters_; }; } // namespace holoscan::ops #endif/* HOLOSCAN_OPERATORS_GXF_CODELET_GXF_CODELET_HPP */

© Copyright 2022-2024, NVIDIA. Last updated on Sep 6, 2024.