NVIDIA DeepStream SDK API Reference

9.2 Release
service-maker/sources/python/src/bindings/docstrings/tensordoc.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #pragma once
19 
20 namespace pydeepstreamdoc
21 {
22  namespace tensor
23  {
24  namespace ColorFormatDoc
25  {
26  constexpr const char* descr = R"pydeepstream(Color format enum.)pydeepstream";
27  }
28 
29  namespace TensorDoc
30  {
31  constexpr const char* descr = R"pydeepstream(
32  Tensor abstraction class.
33 
34  :ivar shape: *tuple*, Shape of the tensor.
35  :ivar strides: *tuple*, Strides of the tensor.
36  :ivar dtype: *dtype*, Data type of the tensor.)pydeepstream";
37  constexpr const char* dlpack = R"pydeepstream(Get the tensor as DLPack capsule.)pydeepstream";
38  constexpr const char* dlpack_device = R"pydeepstream(Get the device type and device ID in DLPack format.)pydeepstream";
39  constexpr const char* wrap = R"pydeepstream(
40  Wrap a tensor as a buffer.
41 
42  :arg format: *:class:`ColorFormat`*, Color format of the buffer.
43  :return: *:class:`Buffer`*, Buffer of wrapped tensor.)pydeepstream";
44  constexpr const char* clone = R"pydeepstream(Clone a tensor.)pydeepstream";
45  constexpr const char* to_gpu = R"pydeepstream(Copy the tensor to GPU given ID of target device.)pydeepstream";
46  constexpr const char* size = R"pydeepstream(Get the size of the tensor in bytes.)pydeepstream";
47  constexpr const char* as_tensor = R"pydeepstream(
48  Wrap tensor data from other frameworks.
49 
50  :arg object: *object*, Object to wrap. If has __dlpack_device__ attribute, it will fill the :class:`Tensor` from the given DLPack information.
51  Otherwise, it will create an empty :class:`Tensor`
52  :arg format: *str*, Format of the tensor.
53  :return: *:class:`Tensor`*, Wrapped :class:`Tensor`.)pydeepstream";
54  }
55  }
56 }
pydeepstreamdoc
Definition: service-maker/sources/python/src/bindings/docstrings/bufferdoc.h:20
pydeepstreamdoc::tensor::TensorDoc::dlpack_device
constexpr const char * dlpack_device
Definition: service-maker/sources/python/src/bindings/docstrings/tensordoc.h:38
pydeepstreamdoc::tensor::TensorDoc::clone
constexpr const char * clone
Definition: service-maker/sources/python/src/bindings/docstrings/tensordoc.h:44
pydeepstreamdoc::tensor::TensorDoc::to_gpu
constexpr const char * to_gpu
Definition: service-maker/sources/python/src/bindings/docstrings/tensordoc.h:45
pydeepstreamdoc::tensor::TensorDoc::wrap
constexpr const char * wrap
Definition: service-maker/sources/python/src/bindings/docstrings/tensordoc.h:39
pydeepstreamdoc::tensor::TensorDoc::size
constexpr const char * size
Definition: service-maker/sources/python/src/bindings/docstrings/tensordoc.h:46
pydeepstreamdoc::tensor::TensorDoc::descr
constexpr const char * descr
Definition: service-maker/sources/python/src/bindings/docstrings/tensordoc.h:31
pydeepstreamdoc::tensor::TensorDoc::as_tensor
constexpr const char * as_tensor
Definition: service-maker/sources/python/src/bindings/docstrings/tensordoc.h:47
pydeepstreamdoc::tensor::TensorDoc::dlpack
constexpr const char * dlpack
Definition: service-maker/sources/python/src/bindings/docstrings/tensordoc.h:37
pydeepstreamdoc::tensor::ColorFormatDoc::descr
constexpr const char * descr
Definition: service-maker/sources/python/src/bindings/docstrings/tensordoc.h:26