| 55 | } // namespace |
| 56 | |
| 57 | void ExportOpConvertTo(py::module &m) |
| 58 | { |
| 59 | using namespace pybind11::literals; |
| 60 | |
| 61 | m.def("convertto", &ConvertTo, "src"_a, "dtype"_a, "scale"_a = 1, "offset"_a = 0, py::kw_only(), |
| 62 | "stream"_a = nullptr, R"pbdoc( |
| 63 | |
| 64 | Executes the Convert To operation on the given cuda stream. |
| 65 | |
| 66 | See also: |
| 67 | Refer to the CV-CUDA C API reference for the Convert To operator |
| 68 | for more details and usage examples. |
| 69 | |
| 70 | Args: |
| 71 | src (cvcuda.Tensor): Input tensor containing one or more images. |
| 72 | scale (float, optional): Scalar for output data. |
| 73 | offset (float, optional): Offset for the data. |
| 74 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 75 | |
| 76 | Returns: |
| 77 | cvcuda.Tensor: The output tensor. |
| 78 | |
| 79 | Caution: |
| 80 | Restrictions to several arguments may apply. Check the C |
| 81 | API references of the CV-CUDA operator. |
| 82 | )pbdoc"); |
| 83 | |
| 84 | m.def("convertto_into", &ConvertToInto, "dst"_a, "src"_a, "scale"_a = 1, "offset"_a = 0, py::kw_only(), |
| 85 | "stream"_a = nullptr, R"pbdoc( |
| 86 | |
| 87 | Executes the Convert To operation on the given cuda stream. |
| 88 | |
| 89 | See also: |
| 90 | Refer to the CV-CUDA C API reference for the Convert To operator |
| 91 | for more details and usage examples. |
| 92 | |
| 93 | Args: |
| 94 | dst (cvcuda.Tensor): Output tensor to store the result of the operation. |
| 95 | src (cvcuda.Tensor): Input tensor containing one or more images. |
| 96 | scale (float, optional): Scalar for output data. |
| 97 | offset (float, optional): Offset for the data. |
| 98 | stream (cvcuda.Stream, optional): CUDA Stream on which to perform the operation. |
| 99 | |
| 100 | Returns: |
| 101 | None |
| 102 | |
| 103 | Caution: |
| 104 | Restrictions to several arguments may apply. Check the C |
| 105 | API references of the CV-CUDA operator. |
| 106 | )pbdoc"); |
| 107 | } |
| 108 | |
| 109 | } // namespace cvcudapy |