/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/docs-6.2.0/rocAL/include/api/rocal_api_types.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/docs-6.2.0/rocAL/include/api/rocal_api_types.h Source File#

rocAL: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/docs-6.2.0/rocAL/include/api/rocal_api_types.h Source File
rocal_api_types.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2019 - 2023 Advanced Micro Devices, Inc. All rights reserved.
3 
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
21 */
22 
23 #ifndef MIVISIONX_ROCAL_API_TYPES_H
24 #define MIVISIONX_ROCAL_API_TYPES_H
25 
26 #include <cstdlib>
27 
28 #ifndef ROCAL_API_CALL
29 #if defined(_WIN32)
30 #define ROCAL_API_CALL __stdcall
31 #else
35 #define ROCAL_API_CALL
36 #endif
37 #endif
38 
47 #include <half/half.hpp>
48 using half_float::half;
49 
53 typedef void *RocalFloatParam;
57 typedef void *RocalIntParam;
61 typedef void *RocalContext;
65 typedef void *RocalImage;
69 typedef void *RocalMetaData;
70 
75 typedef std::vector<int> ImageIDBatch, AnnotationIDBatch;
76 typedef std::vector<std::string> ImagePathBatch;
77 typedef std::vector<float> ScoreBatch, RotationBatch;
78 typedef std::vector<std::vector<float>> CenterBatch, ScaleBatch;
79 typedef std::vector<std::vector<std::vector<float>>> JointsBatch, JointsVisibilityBatch;
81 
85 struct TimingInfo
86 {
87  long long unsigned load_time;
88  long long unsigned decode_time;
89  long long unsigned process_time;
90  long long unsigned transfer_time;
91 };
92 
97 {
98  ImageIDBatch image_id_batch;
99  AnnotationIDBatch annotation_id_batch;
100  ImagePathBatch image_path_batch;
101  CenterBatch center_batch;
102  ScaleBatch scale_batch;
103  JointsBatch joints_batch;
104  JointsVisibilityBatch joints_visibility_batch;
105  ScoreBatch score_batch;
106  RotationBatch rotation_batch;
107 };
108 
113 {
116  ROCAL_OK = 0,
129 };
130 
135 {
148 };
149 
154 {
161 };
162 
167 {
174 };
175 
180 {
196 };
197 
202 {
208  ROCAL_SW_DECODE = 1
209 };
210 
215 {
221  ROCAL_NCHW = 1
222 };
223 
228 {
237  ROCAL_U8 = 2,
238 };
239 
244 {
260 };
261 
266 {
276 };
277 
281 #define ROCAL_MEMCPY_TO_HOST 1
285 #define ROCAL_MEMCPY_TO_DEVICE 2
289 #define ROCAL_MEMCPY_IS_PINNED 4
290 
295 {
308 };
309 
314 {
333 };
334 
335 #endif // MIVISIONX_ROCAL_API_TYPES_H
std::vector< float > RotationBatch
typedef std::vectors
Definition: rocal_api_types.h:77
std::vector< int > AnnotationIDBatch
typedef std::vectors
Definition: rocal_api_types.h:75
void * RocalMetaData
typedef void* rocAL Meta Data
Definition: rocal_api_types.h:69
RocalDecoderType
rocAL Decoder Type enum
Definition: rocal_api_types.h:244
RocalResizeScalingMode
rocAL Resize Scaling Mode enum
Definition: rocal_api_types.h:295
RocalTensorLayout
rocAL Tensor Layout enum
Definition: rocal_api_types.h:215
RocalStatus
rocAL Status enum
Definition: rocal_api_types.h:113
RocalTensorOutputType
rocAL Tensor Output Type enum
Definition: rocal_api_types.h:228
std::vector< std::string > ImagePathBatch
typedef std::vectors
Definition: rocal_api_types.h:76
void * RocalIntParam
typedef void* rocAL Int Param
Definition: rocal_api_types.h:57
RocalImageSizeEvaluationPolicy
rocAL Image Size Evaluation Policy enum
Definition: rocal_api_types.h:180
std::vector< int > ImageIDBatch
typedef std::vectors
Definition: rocal_api_types.h:75
std::vector< std::vector< float > > CenterBatch
typedef std::vectors
Definition: rocal_api_types.h:78
std::vector< float > ScoreBatch
typedef std::vectors
Definition: rocal_api_types.h:77
std::vector< std::vector< float > > ScaleBatch
typedef std::vectors
Definition: rocal_api_types.h:78
RocalProcessMode
rocAL Process Mode enum
Definition: rocal_api_types.h:154
RocalOutputMemType
rocAL Output Mem Type enum
Definition: rocal_api_types.h:266
RocalFlipAxis
rocAL Flip Axis enum
Definition: rocal_api_types.h:167
RocalDecodeDevice
rocAL Decode Device enum
Definition: rocal_api_types.h:202
std::vector< std::vector< std::vector< float > > > JointsVisibilityBatch
typedef std::vectors
Definition: rocal_api_types.h:79
void * RocalFloatParam
typedef void* Float Param
Definition: rocal_api_types.h:53
void * RocalContext
typedef void* rocAL Context
Definition: rocal_api_types.h:61
RocalResizeInterpolationType
rocAL Resize Interpolation Type enum
Definition: rocal_api_types.h:314
RocalImageColor
rocAL Image Color enum
Definition: rocal_api_types.h:135
void * RocalImage
typedef void* rocAL Image
Definition: rocal_api_types.h:65
std::vector< std::vector< std::vector< float > > > JointsBatch
typedef std::vectors
Definition: rocal_api_types.h:79
@ ROCAL_DECODER_OPENCV
AMD ROCAL_DECODER_OPENCV.
Definition: rocal_api_types.h:250
@ ROCAL_DECODER_VIDEO_FFMPEG_HW
AMD ROCAL_DECODER_VIDEO_FFMPEG_HW.
Definition: rocal_api_types.h:259
@ ROCAL_DECODER_VIDEO_FFMPEG_SW
AMD ROCAL_DECODER_VIDEO_FFMPEG_SW.
Definition: rocal_api_types.h:256
@ ROCAL_DECODER_TJPEG
AMD ROCAL_DECODER_TJPEG.
Definition: rocal_api_types.h:247
@ ROCAL_DECODER_HW_JPEG
AMD ROCAL_DECODER_HW_JPEG.
Definition: rocal_api_types.h:253
@ ROCAL_SCALING_MODE_NOT_SMALLER
scales wrt to aspect ratio, so that resize width/height is not lesser than the specified size
Definition: rocal_api_types.h:304
@ ROCAL_SCALING_MODE_NOT_LARGER
scales wrt to aspect ratio, so that resize width/height does not exceed specified size
Definition: rocal_api_types.h:307
@ ROCAL_SCALING_MODE_STRETCH
scales wrt specified size, if only resize width/height is provided the other dimension is not scaled
Definition: rocal_api_types.h:301
@ ROCAL_SCALING_MODE_DEFAULT
scales wrt specified size, if only resize width/height is provided the other dimension is scaled acco...
Definition: rocal_api_types.h:298
@ ROCAL_NCHW
AMD ROCAL_NCHW.
Definition: rocal_api_types.h:221
@ ROCAL_NHWC
AMD ROCAL_NHWC.
Definition: rocal_api_types.h:218
@ ROCAL_UPDATE_PARAMETER_FAILED
AMD ROCAL_UPDATE_PARAMETER_FAILED.
Definition: rocal_api_types.h:125
@ ROCAL_OK
AMD ROCAL_OK.
Definition: rocal_api_types.h:116
@ ROCAL_CONTEXT_INVALID
AMD ROCAL_CONTEXT_INVALID.
Definition: rocal_api_types.h:119
@ ROCAL_RUNTIME_ERROR
AMD ROCAL_RUNTIME_ERROR.
Definition: rocal_api_types.h:122
@ ROCAL_INVALID_PARAMETER_TYPE
AMD ROCAL_INVALID_PARAMETER_TYPE.
Definition: rocal_api_types.h:128
@ ROCAL_U8
AMD ROCAL_U8.
Definition: rocal_api_types.h:237
@ ROCAL_FP32
AMD ROCAL_FP32.
Definition: rocal_api_types.h:231
@ ROCAL_FP16
AMD ROCAL_FP16.
Definition: rocal_api_types.h:234
@ ROCAL_USE_MOST_FREQUENT_SIZE
AMD ROCAL_USE_MOST_FREQUENT_SIZE.
Definition: rocal_api_types.h:189
@ ROCAL_USE_MAX_SIZE
AMD ROCAL_USE_MAX_SIZE.
Definition: rocal_api_types.h:183
@ ROCAL_USE_MAX_SIZE_RESTRICTED
Use max size if the actual decoded size is greater than max.
Definition: rocal_api_types.h:195
@ ROCAL_USE_USER_GIVEN_SIZE
AMD ROCAL_USE_USER_GIVEN_SIZE.
Definition: rocal_api_types.h:186
@ ROCAL_USE_USER_GIVEN_SIZE_RESTRICTED
Use the given size only if the actual decoded size is greater than the given size.
Definition: rocal_api_types.h:192
@ ROCAL_PROCESS_CPU
AMD ROCAL_PROCESS_CPU.
Definition: rocal_api_types.h:160
@ ROCAL_PROCESS_GPU
AMD ROCAL_PROCESS_GPU.
Definition: rocal_api_types.h:157
@ ROCAL_MEMCPY_GPU
AMD ROCAL_MEMCPY_GPU.
Definition: rocal_api_types.h:272
@ ROCAL_MEMCPY_HOST
AMD ROCAL_MEMCPY_HOST.
Definition: rocal_api_types.h:269
@ ROCAL_MEMCPY_PINNED
AMD ROCAL_MEMCPY_PINNED.
Definition: rocal_api_types.h:275
@ ROCAL_FLIP_HORIZONTAL
AMD ROCAL_FLIP_HORIZONTAL.
Definition: rocal_api_types.h:170
@ ROCAL_FLIP_VERTICAL
AMD ROCAL_FLIP_VERTICAL.
Definition: rocal_api_types.h:173
@ ROCAL_SW_DECODE
AMD ROCAL_SW_DECODE.
Definition: rocal_api_types.h:208
@ ROCAL_HW_DECODE
AMD ROCAL_HW_DECODE.
Definition: rocal_api_types.h:205
@ ROCAL_CUBIC_INTERPOLATION
AMD ROCAL_CUBIC_INTERPOLATION.
Definition: rocal_api_types.h:323
@ ROCAL_NEAREST_NEIGHBOR_INTERPOLATION
AMD ROCAL_NEAREST_NEIGHBOR_INTERPOLATION.
Definition: rocal_api_types.h:317
@ ROCAL_GAUSSIAN_INTERPOLATION
AMD ROCAL_GAUSSIAN_INTERPOLATION.
Definition: rocal_api_types.h:329
@ ROCAL_LINEAR_INTERPOLATION
AMD ROCAL_LINEAR_INTERPOLATION.
Definition: rocal_api_types.h:320
@ ROCAL_TRIANGULAR_INTERPOLATION
AMD ROCAL_TRIANGULAR_INTERPOLATION.
Definition: rocal_api_types.h:332
@ ROCAL_LANCZOS_INTERPOLATION
AMD ROCAL_LANCZOS_INTERPOLATION.
Definition: rocal_api_types.h:326
@ ROCAL_COLOR_U8
AMD ROCAL_COLOR_U8.
Definition: rocal_api_types.h:144
@ ROCAL_COLOR_RGB24
AMD ROCAL_COLOR_RGB24.
Definition: rocal_api_types.h:138
@ ROCAL_COLOR_RGB_PLANAR
AMD ROCAL_COLOR_RGB_PLANAR.
Definition: rocal_api_types.h:147
@ ROCAL_COLOR_BGR24
AMD ROCAL_COLOR_BGR24.
Definition: rocal_api_types.h:141
rocAL Joints Data struct - HRNet training expects meta data (joints_data) in below format,...
Definition: rocal_api_types.h:97
Timing Info struct.
Definition: rocal_api_types.h:86