NVIDIA DeepStream SDK API Reference

9.2 Release
9.2/includes/ds3d/common/helper/dtype.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-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 #ifndef DS3D_COMMON_HELPER_DTYPE_HPP
19 #define DS3D_COMMON_HELPER_DTYPE_HPP
20 
21 namespace ds3d {
22 
23 struct Int2 {
24  int x, y;
25 
26  Int2() = default;
27  Int2(int x, int y = 0) : x(x), y(y) {}
28 };
29 
30 struct Int3 {
31  int x, y, z;
32 
33  Int3() = default;
34  Int3(int x, int y = 0, int z = 0) : x(x), y(y), z(z) {}
35 };
36 
37 struct Int4 {
38  int x, y, z, w;
39 
40  Int4() = default;
41  Int4(int x, int y = 0, int z = 0, int w = 0) : x(x), y(y), z(z), w(w) {}
42 };
43 
44 struct Float2 {
45  float x, y;
46 
47  Float2() = default;
48  Float2(float x, float y = 0) : x(x), y(y) {}
49 };
50 
51 struct Float3 {
52  float x, y, z;
53 
54  Float3() = default;
55  Float3(float x, float y = 0, float z = 0) : x(x), y(y), z(z) {}
56 };
57 
58 struct Float4 {
59  float x, y, z, w;
60 
61  Float4() = default;
62  Float4(float x, float y = 0, float z = 0, float w = 0) : x(x), y(y), z(z), w(w) {}
63 };
64 
65 // It is only used to specify the type only, while hoping to avoid header file contamination.
66 typedef struct {
67  unsigned short __x;
68 } half;
69 
70 }; // namespace ds3d
71 
72 #endif // DS3D_COMMON_HELPER_DTYPE_HPP
ds3d::Float4::z
float z
Definition: includes/ds3d/common/helper/dtype.hpp:59
ds3d::Int4::Int4
Int4()=default
ds3d::Int3::x
int x
Definition: includes/ds3d/common/helper/dtype.hpp:31
ds3d::Int2::x
int x
Definition: includes/ds3d/common/helper/dtype.hpp:24
ds3d::Float2::Float2
Float2(float x, float y=0)
Definition: 9.2/includes/ds3d/common/helper/dtype.hpp:48
ds3d::Int2::Int2
Int2()=default
ds3d::Int4::z
int z
Definition: includes/ds3d/common/helper/dtype.hpp:38
ds3d::Float3::Float3
Float3()=default
ds3d::Int3::z
int z
Definition: includes/ds3d/common/helper/dtype.hpp:31
ds3d::Float4::x
float x
Definition: includes/ds3d/common/helper/dtype.hpp:59
ds3d::Int4::w
int w
Definition: includes/ds3d/common/helper/dtype.hpp:38
ds3d::Float3::Float3
Float3(float x, float y=0, float z=0)
Definition: 9.2/includes/ds3d/common/helper/dtype.hpp:55
ds3d::Int3::Int3
Int3(int x, int y=0, int z=0)
Definition: 9.2/includes/ds3d/common/helper/dtype.hpp:34
ds3d::Int4::y
int y
Definition: includes/ds3d/common/helper/dtype.hpp:38
ds3d::Int2::y
int y
Definition: includes/ds3d/common/helper/dtype.hpp:24
ds3d::Float4::w
float w
Definition: includes/ds3d/common/helper/dtype.hpp:59
ds3d::Float3::x
float x
Definition: includes/ds3d/common/helper/dtype.hpp:52
ds3d::Int3::y
int y
Definition: includes/ds3d/common/helper/dtype.hpp:31
ds3d::Float4::Float4
Float4()=default
ds3d::Int4::x
int x
Definition: includes/ds3d/common/helper/dtype.hpp:38
ds3d::Int2::Int2
Int2(int x, int y=0)
Definition: 9.2/includes/ds3d/common/helper/dtype.hpp:27
ds3d::Int4::Int4
Int4(int x, int y=0, int z=0, int w=0)
Definition: 9.2/includes/ds3d/common/helper/dtype.hpp:41
ds3d::Float3::y
float y
Definition: includes/ds3d/common/helper/dtype.hpp:52
ds3d::Int3::Int3
Int3()=default
ds3d::Float4::y
float y
Definition: includes/ds3d/common/helper/dtype.hpp:59
ds3d::Float2::Float2
Float2()=default
ds3d::Float4::Float4
Float4(float x, float y=0, float z=0, float w=0)
Definition: 9.2/includes/ds3d/common/helper/dtype.hpp:62
ds3d::Float2::x
float x
Definition: includes/ds3d/common/helper/dtype.hpp:45
ds3d::Float3::z
float z
Definition: includes/ds3d/common/helper/dtype.hpp:52
ds3d
Definition: includes/ds3d/common/abi_dataprocess.h:25
ds3d::Float2::y
float y
Definition: includes/ds3d/common/helper/dtype.hpp:45