Define HOLOSCAN_WRAP_GXF_CODELET_AS_OPERATOR

Holoscan v2.1.0
HOLOSCAN_WRAP_GXF_CODELET_AS_OPERATOR(class_name, gxf_typename)

Wrap a GXF Codelet as a Holoscan Operator.

This macro is designed to simplify the creation of Holoscan operators that encapsulate GXF Codelets. It defines a class derived from holoscan::ops::GXFCodeletOp and sets up the constructor to forward arguments to the base class while automatically setting the GXF type name.

The resulting class is intended to act as a bridge, allowing GXF Codelets to be used directly within the Holoscan framework as operators, facilitating seamless integration and usage.

Example Usage:

Copy
Copied!
            

// Define a Holoscan operator that wraps a GXF Codelet within a Holoscan application class App : public holoscan::Application { ... HOLOSCAN_WRAP_GXF_CODELET_AS_OPERATOR(MyTensorOp, "nvidia::gxf::test::SendTensor") void compose() override { using namespace holoscan; ... auto tx = make_operator<MyTensorOp>( "tx", make_condition<CountCondition>(15), Arg("pool") = make_resource<UnboundedAllocator>("pool")); ... } ... };

Parameters
  • class_name – The name of the new Holoscan operator class.

  • gxf_typename – The GXF type name that identifies the specific GXF Codelet being wrapped.

Previous Define HOLOSCAN_SCHEDULER_FORWARD_TEMPLATE
Next Define HOLOSCAN_WRAP_GXF_COMPONENT_AS_RESOURCE
© Copyright 2022-2024, NVIDIA. Last updated on Jul 3, 2024.