:github_url: https://github.com/pytorch/pytorch .. _program_listing_file_torch_csrc_jit_runtime_custom_operator.h: Program Listing for File custom_operator.h ========================================== |exhale_lsh| :ref:`Return to documentation for file ` (``torch/csrc/jit/runtime/custom_operator.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include #include namespace torch::jit { struct TORCH_API RegisterOperators { RegisterOperators() = default; explicit RegisterOperators(std::vector> operators) { for (std::optional& o : operators) { if (o) { registerOperator(std::move(o.value())); } } } }; } // namespace torch::jit