/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.3.0/include/rppdefs.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.3.0/include/rppdefs.h Source File#

RPP: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.3.0/include/rppdefs.h Source File
rppdefs.h
Go to the documentation of this file.
1 /*
2 MIT License
3 
4 Copyright (c) 2019 - 2024 Advanced Micro Devices, Inc.
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 SOFTWARE.
23 */
24 
25 #ifndef RPPDEFS_H
26 #define RPPDEFS_H
27 
34 #include <stddef.h>
35 #include <cmath>
36 #ifdef OCL_COMPILE
37 #include <CL/cl.h>
38 #endif
39 
40 #if _WIN32
41 #include <intrin.h>
42 #else
43 #include <x86intrin.h>
44 #include <smmintrin.h>
45 #include <immintrin.h>
46 #endif
47 #include<vector>
48 
50 #define RPP_MIN_8U ( 0 )
52 #define RPP_MAX_8U ( 255 )
54 #define RPPT_MAX_DIMS ( 5 )
56 #define RPPT_MAX_AUDIO_CHANNELS ( 16 )
57 
58 #define CHECK_RETURN_STATUS(x) do { \
59  int retval = (x); \
60  if (retval != 0) { \
61  fprintf(stderr, "Runtime error: %s returned %d at %s:%d", #x, retval, __FILE__, __LINE__); \
62  exit(-1); \
63  } \
64 } while (0)
65 
66 #ifdef HIP_COMPILE
67 #include <hip/hip_runtime.h>
68 #define RPP_HOST_DEVICE __host__ __device__
69 #else
70 #define RPP_HOST_DEVICE
71 #endif
72 
73 const float ONE_OVER_6 = 1.0f / 6;
74 const float ONE_OVER_3 = 1.0f / 3;
75 const float ONE_OVER_255 = 1.0f / 255;
76 const uint MMS_MAX_SCRATCH_MEMORY = 76800000; // maximum scratch memory size (number of floats) needed for MMS buffer in RNNT training
77 
78 /******************** RPP typedefs ********************/
79 
81 typedef unsigned char Rpp8u;
83 typedef signed char Rpp8s;
85 typedef unsigned short Rpp16u;
87 typedef short Rpp16s;
89 typedef unsigned int Rpp32u;
91 typedef int Rpp32s;
93 typedef unsigned long long Rpp64u;
95 typedef long long Rpp64s;
97 typedef float Rpp32f;
99 typedef double Rpp64f;
101 typedef void* RppPtr_t;
103 typedef size_t RppSize_t;
104 
108 typedef enum
109 {
113  RPP_ERROR = -1,
159 
163 typedef enum
164 {
165  rppStatusSuccess = 0,
166  rppStatusBadParm = -1,
167  rppStatusUnknownError = -2,
168  rppStatusNotInitialized = -3,
169  rppStatusInvalidValue = -4,
170  rppStatusAllocFailed = -5,
171  rppStatusInternalError = -6,
172  rppStatusNotImplemented = -7,
173  rppStatusUnsupportedOp = -8,
174 } rppStatus_t;
175 
179 typedef enum
180 {
181  RPP_SCALAR_OP_AND = 1,
182  RPP_SCALAR_OP_OR,
183  RPP_SCALAR_OP_XOR,
184  RPP_SCALAR_OP_NAND,
185  RPP_SCALAR_OP_EQUAL,
186  RPP_SCALAR_OP_NOTEQUAL,
187  RPP_SCALAR_OP_LESS,
188  RPP_SCALAR_OP_LESSEQ,
189  RPP_SCALAR_OP_GREATER,
190  RPP_SCALAR_OP_GREATEREQ,
191  RPP_SCALAR_OP_ADD,
192  RPP_SCALAR_OP_SUBTRACT,
193  RPP_SCALAR_OP_MULTIPLY,
194  RPP_SCALAR_OP_DIVIDE,
195  RPP_SCALAR_OP_MODULUS,
196  RPP_SCALAR_OP_MIN,
197  RPP_SCALAR_OP_MAX,
198 } RppOp;
199 
203 typedef enum
204 {
205  U8_S8,
206  S8_U8,
208 
212 typedef struct
213 {
214  Rpp32f rho;
215  Rpp32f theta;
216 } RppPointPolar;
217 
221 typedef struct
222 {
223  Rpp32u channelParam;
224  Rpp32u bufferMultiplier;
226 
230 typedef struct
231 {
232  Rpp32f data[6];
233 } Rpp32f6;
234 
238 typedef struct
239 {
240  Rpp32s data[24];
241 } Rpp32s24;
242 
246 typedef struct
247 {
248  Rpp32f data[24];
249 } Rpp32f24;
250 
251 /******************** RPPI typedefs ********************/
252 
256 typedef enum
257 {
258  RGB_HSV = 1,
259  HSV_RGB
261 
265 typedef enum
266 {
267  RPPI_LOW,
268  RPPI_MEDIUM,
269  RPPI_HIGH
271 
275 typedef enum
276 {
277  RPPI_CHN_PLANAR,
278  RPPI_CHN_PACKED
279 } RppiChnFormat;
280 
284 typedef enum
285 {
286  RPPI_HORIZONTAL_AXIS,
287  RPPI_VERTICAL_AXIS,
288  RPPI_BOTH_AXIS
289 } RppiAxis;
290 
294 typedef enum
295 {
296  GAUSS3,
297  GAUSS5,
298  GAUSS3x1,
299  GAUSS1x3,
300  AVG3 = 10,
301  AVG5
302 } RppiBlur;
303 
307 typedef enum
308 {
309  ZEROPAD,
310  NOPAD
311 } RppiPad;
312 
316 typedef enum
317 {
318  RGB,
319  HSV
320 } RppiFormat;
321 
325 typedef struct
326 {
327  unsigned int width;
328  unsigned int height;
329 } RppiSize;
330 
334 typedef struct
335 {
336  int x;
337  int y;
338 } RppiPoint;
339 
343 typedef struct
344 {
345  int x;
346  int y;
347  int z;
348 } RppiPoint3D;
349 
353 typedef struct
354 {
355  int x;
356  int y;
357  int width;
358  int height;
359 } RppiRect;
360 
364 typedef struct
365 {
366  unsigned int x;
367  unsigned int y;
368  unsigned int roiWidth;
369  unsigned int roiHeight;
370 } RppiROI;
371 
372 /******************** RPPT typedefs ********************/
373 
377 typedef enum
378 {
379  U8,
380  F32,
381  F16,
382  I8
383 } RpptDataType;
384 
388 typedef enum
389 {
390  NCHW, // BatchSize-Channels-Height-Width
391  NHWC, // BatchSize-Height-Width-Channels
392  NCDHW, // BatchSize-Channels-Depth-Height-Width
393  NDHWC, // BatchSize-Depth-Height-Width-Channels
394  NHW, // BatchSize-Height-Width
395  NFT, // BatchSize-Frequency-Time -> Frequency Major used for Spectrogram / MelfilterBank
396  NTF // BatchSize-Time-Frequency -> Time Major used for Spectrogram / MelfilterBank
397 } RpptLayout;
398 
402 typedef enum
403 {
404  LTRB, // Left-Top-Right-Bottom
405  XYWH // X-Y-Width-Height
406 } RpptRoiType;
407 
411 typedef enum
412 {
413  LTFRBB, // Left-Top-Front-Right-Bottom-Back
414  XYZWHD // X-Y-Z-Width-Height-Depth
415 } RpptRoi3DType;
416 
420 typedef enum
421 {
422  RGBtype,
423  BGRtype
425 
429 typedef enum
430 {
431  NEAREST_NEIGHBOR = 0,
432  BILINEAR,
433  BICUBIC,
434  LANCZOS,
435  GAUSSIAN,
436  TRIANGULAR
438 
442 typedef enum
443 {
444  ZERO = 0,
445  CLAMP,
446  REFLECT
448 
452 typedef enum
453 {
454  SLANEY = 0, // Follows Slaney’s MATLAB Auditory Modelling Work behavior
455  HTK, // Follows O’Shaughnessy’s book formula, consistent with Hidden Markov Toolkit(HTK), m = 2595 * log10(1 + (f/700))
457 
461 typedef struct
462 {
463  RppiPoint lt, rb; // Left-Top point and Right-Bottom point
464 
465 } RpptRoiLtrb;
466 
470 typedef struct
471 {
472  RppiPoint r;
473  RppiPoint g;
474  RppiPoint b;
476 
480 typedef struct
481 {
482  RppiPoint3D ltf, rbb; // Left-Top-Front point and Right-Bottom-Back point
483 
484 } RpptRoiLtfrbb;
485 
489 typedef struct
490 {
491  RppiPoint xy;
492  int roiWidth, roiHeight;
493 
494 } RpptRoiXywh;
495 
499 typedef struct
500 {
501  RppiPoint3D xyz;
502  int roiWidth, roiHeight, roiDepth;
503 
504 } RpptRoiXyzwhd;
505 
509 typedef union
510 {
511  RpptRoiLtrb ltrbROI; // ROI defined as Left-Top-Right-Bottom
512  RpptRoiXywh xywhROI; // ROI defined as X-Y-Width-Height
513 
514 } RpptROI, *RpptROIPtr;
515 
519 typedef union
520 {
521  RpptRoiLtfrbb ltfrbbROI; // ROI defined as Left-Top-Front-Right-Bottom-Back
522  RpptRoiXyzwhd xyzwhdROI; // ROI defined as X-Y-Z-Width-Height-Depth
523 
525 
529 typedef struct
530 {
531  Rpp32u nStride;
532  Rpp32u cStride;
533  Rpp32u hStride;
534  Rpp32u wStride;
535 } RpptStrides;
536 
540 typedef struct
541 {
542  RppSize_t numDims;
543  Rpp32u offsetInBytes;
544  RpptDataType dataType;
545  Rpp32u n, c, h, w;
546  RpptStrides strides;
547  RpptLayout layout;
549 
553 typedef struct
554 {
555  RppSize_t numDims;
556  Rpp32u offsetInBytes;
557  RpptDataType dataType;
558  Rpp32u dims[RPPT_MAX_DIMS];
559  Rpp32u strides[RPPT_MAX_DIMS];
560  RpptLayout layout;
562 
566 typedef struct
567 {
568  Rpp8u R;
569  Rpp8u G;
570  Rpp8u B;
571 } RpptRGB;
572 
576 typedef struct
577 {
578  Rpp32f R;
579  Rpp32f G;
580  Rpp32f B;
581 } RpptFloatRGB;
582 
586 typedef struct
587 {
588  Rpp32u x;
589  Rpp32u y;
591 
595 typedef struct
596 {
597  Rpp32f x;
598  Rpp32f y;
600 
604 typedef struct
605 {
606  Rpp32u width;
607  Rpp32u height;
609 
613 typedef struct
614 { Rpp32u x[5];
615  Rpp32u counter;
617 
621 typedef struct
622 { Rpp32s x[5];
623  Rpp32s counter;
624  int boxMullerFlag;
625  float boxMullerExtra;
627 
631 typedef struct
632 {
633  Rpp32s24 srcLocsTL;
634  Rpp32s24 srcLocsTR;
635  Rpp32s24 srcLocsBL;
636  Rpp32s24 srcLocsBR;
638 
642 typedef struct
643 {
644  Rpp32f24 srcValsTL;
645  Rpp32f24 srcValsTR;
646  Rpp32f24 srcValsBL;
647  Rpp32f24 srcValsBR;
649 
653 typedef struct GenericFilter
654 {
655  Rpp32f scale = 1.0f;
656  Rpp32f radius = 1.0f;
657  Rpp32s size;
658  GenericFilter(RpptInterpolationType interpolationType, Rpp32s in_size, Rpp32s out_size, Rpp32f scaleRatio)
659  {
660  switch(interpolationType)
661  {
662  case RpptInterpolationType::BICUBIC:
663  {
664  this->radius = 2.0f;
665  break;
666  }
667  case RpptInterpolationType::LANCZOS:
668  {
669  if(in_size > out_size)
670  {
671  this->radius = 3.0f * scaleRatio;
672  this->scale = (1 / scaleRatio);
673  }
674  else
675  this->radius = 3.0f;
676  break;
677  }
678  case RpptInterpolationType::GAUSSIAN:
679  {
680  if(in_size > out_size)
681  {
682  this->radius = scaleRatio;
683  this->scale = (1 / scaleRatio);
684  }
685  break;
686  }
687  case RpptInterpolationType::TRIANGULAR:
688  {
689  if(in_size > out_size)
690  {
691  this->radius = scaleRatio;
692  this->scale = (1 / scaleRatio);
693  }
694  break;
695  }
696  default:
697  {
698  this->radius = 1.0f;
699  this->scale = 1.0f;
700  break;
701  }
702  }
703  this->size = std::ceil(2 * this->radius);
704  }
706 
710 typedef struct RpptResamplingWindow
711 {
712  inline RPP_HOST_DEVICE void input_range(Rpp32f x, Rpp32s *loc0, Rpp32s *loc1)
713  {
714  Rpp32s xc = std::ceil(x);
715  *loc0 = xc - lobes;
716  *loc1 = xc + lobes;
717  }
718 
719  inline Rpp32f operator()(Rpp32f x)
720  {
721  Rpp32f locRaw = x * scale + center;
722  Rpp32s locFloor = std::floor(locRaw);
723  Rpp32f weight = locRaw - locFloor;
724  locFloor = std::max(std::min(locFloor, lookupSize - 2), 0);
725  Rpp32f current = lookup[locFloor];
726  Rpp32f next = lookup[locFloor + 1];
727  return current + weight * (next - current);
728  }
729 
730  inline __m128 operator()(__m128 x)
731  {
732  __m128 pLocRaw = _mm_add_ps(_mm_mul_ps(x, pScale), pCenter);
733  __m128i pxLocFloor = _mm_cvttps_epi32(pLocRaw);
734  __m128 pLocFloor = _mm_cvtepi32_ps(pxLocFloor);
735  __m128 pWeight = _mm_sub_ps(pLocRaw, pLocFloor);
736  Rpp32s idx[4];
737  _mm_storeu_si128(reinterpret_cast<__m128i*>(idx), pxLocFloor);
738  __m128 pCurrent = _mm_setr_ps(lookup[idx[0]], lookup[idx[1]], lookup[idx[2]], lookup[idx[3]]);
739  __m128 pNext = _mm_setr_ps(lookup[idx[0] + 1], lookup[idx[1] + 1], lookup[idx[2] + 1], lookup[idx[3] + 1]);
740  return _mm_add_ps(pCurrent, _mm_mul_ps(pWeight, _mm_sub_ps(pNext, pCurrent)));
741  }
742 
743  Rpp32f scale = 1, center = 1;
744  Rpp32s lobes = 0, coeffs = 0;
745  Rpp32s lookupSize = 0;
746  Rpp32f *lookupPinned = nullptr;
747  std::vector<Rpp32f> lookup;
748  __m128 pCenter, pScale;
750 
751 /******************** HOST memory typedefs ********************/
752 
756 typedef struct
757 {
758  Rpp32f *floatmem;
759 } memRpp32f;
760 
764 typedef struct
765 {
766  Rpp64f *doublemem;
767 } memRpp64f;
768 
772 typedef struct
773 {
774  Rpp32u *uintmem;
775 } memRpp32u;
776 
780 typedef struct
781 {
782  Rpp32s *intmem;
783 } memRpp32s;
784 
788 typedef struct
789 {
790  Rpp8u *ucharmem;
791 } memRpp8u;
792 
796 typedef struct
797 {
798  Rpp8s *charmem;
799 } memRpp8s;
800 
804 typedef struct
805 {
806  RpptRGB* rgbmem;
807 } memRpptRGB;
808 
812 typedef struct
813 {
814  Rpp32u *height;
815  Rpp32u *width;
816 } memSize;
817 
821 typedef struct
822 {
823  Rpp32u *x;
824  Rpp32u *y;
825  Rpp32u *roiHeight;
826  Rpp32u *roiWidth;
827 } memROI;
828 
832 typedef struct {
833  RppiSize *srcSize;
834  RppiSize *dstSize;
835  RppiSize *maxSrcSize;
836  RppiSize *maxDstSize;
837  RppiROI *roiPoints;
838  memRpp32f floatArr[10];
839  memRpp64f doubleArr[10];
840  memRpp32u uintArr[10];
841  memRpp32s intArr[10];
842  memRpp8u ucharArr[10];
843  memRpp8s charArr[10];
844  memRpptRGB rgbArr;
845  Rpp64u *srcBatchIndex;
846  Rpp64u *dstBatchIndex;
847  Rpp32u *inc;
848  Rpp32u *dstInc;
849  Rpp32f *scratchBufferHost;
850 } memCPU;
851 
852 #ifdef OCL_COMPILE
853 
854 /******************** OCL memory typedefs ********************/
855 
859 typedef struct
860 {
861  cl_mem floatmem;
862 } clmemRpp32f;
863 
867 typedef struct
868 {
869  cl_mem doublemem;
870 } clmemRpp64f;
871 
875 typedef struct
876 {
877  cl_mem uintmem;
878 } clmemRpp32u;
879 
883 typedef struct
884 {
885  cl_mem intmem;
886 } clmemRpp32s;
887 
891 typedef struct
892 {
893  cl_mem ucharmem;
894 } clmemRpp8u;
895 
899 typedef struct
900 {
901  cl_mem charmem;
902 } clmemRpp8s;
903 
907 typedef struct
908 {
909  cl_mem height;
910  cl_mem width;
911 } clmemSize;
912 
916 typedef struct
917 {
918  cl_mem x;
919  cl_mem y;
920  cl_mem roiHeight;
921  cl_mem roiWidth;
922 } clmemROI;
923 
927 typedef struct
928 {
929  memSize csrcSize;
930  memSize cdstSize;
931  memSize cmaxSrcSize;
932  memSize cmaxDstSize;
933  memROI croiPoints;
934  clmemSize srcSize;
935  clmemSize dstSize;
936  clmemSize maxSrcSize;
937  clmemSize maxDstSize;
938  clmemROI roiPoints;
939  clmemRpp32f floatArr[10];
940  clmemRpp64f doubleArr[10];
941  clmemRpp32u uintArr[10];
942  clmemRpp32s intArr[10];
943  clmemRpp8u ucharArr[10];
944  clmemRpp8s charArr[10];
945  cl_mem srcBatchIndex;
946  cl_mem dstBatchIndex;
947  cl_mem inc;
948  cl_mem dstInc;
949 } memGPU;
950 
954 typedef struct
955 {
956  memCPU mcpu;
957  memGPU mgpu;
958 } memMgmt;
959 
960 #elif defined(HIP_COMPILE)
961 
962 /******************** HIP memory typedefs ********************/
963 
967 typedef struct
968 {
969  Rpp32f* floatmem;
970 } hipMemRpp32f;
971 
975 typedef struct
976 {
977  Rpp64f* doublemem;
978 } hipMemRpp64f;
979 
983 typedef struct
984 {
985  Rpp32u* uintmem;
986 } hipMemRpp32u;
987 
991 typedef struct
992 {
993  Rpp32s* intmem;
994 } hipMemRpp32s;
995 
999 typedef struct
1000 {
1001  Rpp8u* ucharmem;
1002 } hipMemRpp8u;
1003 
1007 typedef struct
1008 {
1009  Rpp8s* charmem;
1010 } hipMemRpp8s;
1011 
1015 typedef struct
1016 {
1017  RpptRGB* rgbmem;
1018 } hipMemRpptRGB;
1019 
1023 typedef struct
1024 {
1025  Rpp32u* height;
1026  Rpp32u* width;
1027 } hipMemSize;
1028 
1032 typedef struct
1033 {
1034  Rpp32u* x;
1035  Rpp32u* y;
1036  Rpp32u* roiHeight;
1037  Rpp32u* roiWidth;
1038 } hipMemROI;
1039 
1043 typedef struct
1044 {
1045  memSize csrcSize;
1046  memSize cdstSize;
1047  memSize cmaxSrcSize;
1048  memSize cmaxDstSize;
1049  memROI croiPoints;
1050  hipMemSize srcSize;
1051  hipMemSize dstSize;
1052  hipMemSize maxSrcSize;
1053  hipMemSize maxDstSize;
1054  hipMemROI roiPoints;
1055  hipMemRpp32f floatArr[10];
1056  hipMemRpp32f float3Arr[10];
1057  hipMemRpp64f doubleArr[10];
1058  hipMemRpp32u uintArr[10];
1059  hipMemRpp32s intArr[10];
1060  hipMemRpp8u ucharArr[10];
1061  hipMemRpp8s charArr[10];
1062  hipMemRpptRGB rgbArr;
1063  hipMemRpp32f scratchBufferHip;
1064  Rpp64u* srcBatchIndex;
1065  Rpp64u* dstBatchIndex;
1066  Rpp32u* inc;
1067  Rpp32u* dstInc;
1068  hipMemRpp32f scratchBufferPinned;
1069 } memGPU;
1070 
1074 typedef struct
1075 {
1076  memCPU mcpu;
1077  memGPU mgpu;
1078 } memMgmt;
1079 
1080 #else
1081 
1085 typedef struct
1086 {
1087  memCPU mcpu;
1088 } memMgmt;
1089 
1090 #endif //BACKEND
1091 
1095 typedef struct
1096 {
1097  RppPtr_t cpuHandle;
1098  Rpp32u nbatchSize;
1099  memMgmt mem;
1100 } InitHandle;
1101 
1102 #endif /* RPPDEFS_H */
RppiPad
RPPI Image pad type enum.
Definition: rppdefs.h:308
RppiFormat
RPPI Image format type enum.
Definition: rppdefs.h:317
unsigned int Rpp32u
32 bit unsigned int
Definition: rppdefs.h:89
RppConvertBitDepthMode
RPP BitDepth Conversion type enum.
Definition: rppdefs.h:204
int Rpp32s
32 bit signed int
Definition: rppdefs.h:91
signed char Rpp8s
8 bit signed char
Definition: rppdefs.h:83
RppiChnFormat
RPPI Image channel format type enum.
Definition: rppdefs.h:276
RpptMelScaleFormula
RPPT Mel Scale Formula.
Definition: rppdefs.h:453
unsigned short Rpp16u
16 bit unsigned short
Definition: rppdefs.h:85
unsigned char Rpp8u
8 bit unsigned char
Definition: rppdefs.h:81
void * RppPtr_t
void pointer
Definition: rppdefs.h:101
RpptLayout
RPPT Tensor layout type enum.
Definition: rppdefs.h:389
RppiBlur
RPPI Image blur type enum.
Definition: rppdefs.h:295
RppiAxis
RPP Image axis type enum.
Definition: rppdefs.h:285
RpptRoiType
RPPT Tensor 2D ROI type enum.
Definition: rppdefs.h:403
RpptDataType
RPPT Tensor datatype enum.
Definition: rppdefs.h:378
struct RpptResamplingWindow RpptResamplingWindow
RPPT Tensor RpptResamplingWindow type struct.
double Rpp64f
64 bit double
Definition: rppdefs.h:99
RpptAudioBorderType
RPPT Audio Border Type.
Definition: rppdefs.h:443
size_t RppSize_t
size_t
Definition: rppdefs.h:103
struct GenericFilter GenericFilter
RPPT Tensor GenericFilter type struct.
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:109
RpptRoi3DType
RPPT Tensor 3D ROI type enum.
Definition: rppdefs.h:412
RppOp
RPP Operations type enum.
Definition: rppdefs.h:180
unsigned long long Rpp64u
64 bit unsigned long long
Definition: rppdefs.h:93
#define RPPT_MAX_DIMS
RPP maximum dimensions in tensor .
Definition: rppdefs.h:54
RpptInterpolationType
RPPT Tensor interpolation type enum.
Definition: rppdefs.h:430
RpptSubpixelLayout
RPPT Tensor subpixel layout type enum.
Definition: rppdefs.h:421
short Rpp16s
16 bit signed short
Definition: rppdefs.h:87
RppiColorConvertMode
RPPI Image color convert mode type enum.
Definition: rppdefs.h:257
float Rpp32f
32 bit float
Definition: rppdefs.h:97
RppiFuzzyLevel
RPPI Image fuzzy level type enum.
Definition: rppdefs.h:266
long long Rpp64s
64 bit long long
Definition: rppdefs.h:95
rppStatus_t
RPP rppStatus_t type enums.
Definition: rppdefs.h:164
@ RPP_ERROR_NOT_IMPLEMENTED
Function variant requested is not implemented / unsupported.
Definition: rppdefs.h:123
@ RPP_ERROR_INVALID_DST_DATATYPE
Invalid dst tensor datatype. (Needs to adhere to function specification.)
Definition: rppdefs.h:135
@ RPP_ERROR_INVALID_OUTPUT_TILE_LENGTH
Invalid output tile length (Needs to adhere to function specification.)
Definition: rppdefs.h:151
@ RPP_ERROR_OUT_OF_BOUND_SRC_ROI
Out of bound source ROI.
Definition: rppdefs.h:145
@ RPP_ERROR_OUT_OF_BOUND_SHARED_MEMORY_SIZE
Shared memory size needed is beyond the bounds (Needs to adhere to function specification....
Definition: rppdefs.h:153
@ RPP_ERROR_ZERO_DIVISION
Arguments provided will result in zero division error.
Definition: rppdefs.h:119
@ RPP_ERROR_INVALID_ARGUMENTS
One or more arguments invalid. (Needs to adhere to function specification.)
Definition: rppdefs.h:115
@ RPP_ERROR_LAYOUT_MISMATCH
src and dst layout mismatch
Definition: rppdefs.h:147
@ RPP_ERROR_INVALID_CHANNELS
Number of channels is invalid. (Needs to adhere to function specification.)
Definition: rppdefs.h:149
@ RPP_ERROR_INVALID_SRC_CHANNELS
Invalid src tensor number of channels. (Needs to adhere to function specification....
Definition: rppdefs.h:125
@ RPP_ERROR_INVALID_SRC_OR_DST_DATATYPE
Invalid src/dst tensor datatype. (Needs to adhere to function specification.)
Definition: rppdefs.h:137
@ RPP_ERROR_INVALID_PARAMETER_DATATYPE
Invalid datatype.
Definition: rppdefs.h:141
@ RPP_ERROR_NOT_ENOUGH_MEMORY
Not enough memory to write outputs, as per dim-lengths and strides set in descriptor.
Definition: rppdefs.h:143
@ RPP_ERROR
Unspecified error.
Definition: rppdefs.h:113
@ RPP_ERROR_INVALID_SRC_DIMS
Number of src dims is invalid. (Needs to adhere to function specification.)
Definition: rppdefs.h:157
@ RPP_ERROR_OUT_OF_BOUND_SCRATCH_MEMORY_SIZE
Scratch memory size needed is beyond the bounds (Needs to adhere to function specification....
Definition: rppdefs.h:155
@ RPP_ERROR_INVALID_DST_LAYOUT
Invalid dst tensor layout. (Needs to adhere to function specification.)
Definition: rppdefs.h:131
@ RPP_ERROR_INVALID_DST_CHANNELS
Invalid dst tensor number of channels. (Needs to adhere to function specification....
Definition: rppdefs.h:127
@ RPP_ERROR_INVALID_SRC_DATATYPE
Invalid src tensor datatype. (Needs to adhere to function specification.)
Definition: rppdefs.h:133
@ RPP_ERROR_INVALID_SRC_LAYOUT
Invalid src tensor layout. (Needs to adhere to function specification.)
Definition: rppdefs.h:129
@ RPP_ERROR_HIGH_SRC_DIMENSION
Src tensor / src ROI dimension too high. (Needs to adhere to function specification....
Definition: rppdefs.h:121
@ RPP_SUCCESS
No error.
Definition: rppdefs.h:111
@ RPP_ERROR_INSUFFICIENT_DST_BUFFER_LENGTH
Insufficient dst buffer length provided. (Needs to adhere to function specification....
Definition: rppdefs.h:139
@ RPP_ERROR_LOW_OFFSET
Low tensor offsetInBytes provided for src/dst tensor.
Definition: rppdefs.h:117
RPPT Tensor GenericFilter type struct.
Definition: rppdefs.h:654
RPP initialize handle.
Definition: rppdefs.h:1096
RPP 24 float vector.
Definition: rppdefs.h:247
RPP 6 float vector.
Definition: rppdefs.h:231
RPP 24 signed int vector.
Definition: rppdefs.h:239
RPP layout params.
Definition: rppdefs.h:222
RPP polar point.
Definition: rppdefs.h:213
RPPI Image 3D point type struct.
Definition: rppdefs.h:344
RPPI Image 2D cartesian point type struct.
Definition: rppdefs.h:335
RPPI Image 2D ROI (XYWH format) type struct.
Definition: rppdefs.h:365
RPPI Image 2D Rectangle (XYWH format) type struct.
Definition: rppdefs.h:354
RPPI Image size(Width/Height dimensions) type struct.
Definition: rppdefs.h:326
RPPT Tensor 2D bilinear neighborhood 32-bit signed int 8-length-vectors type struct.
Definition: rppdefs.h:632
RPPT Tensor 2D bilinear neighborhood 32-bit float 8-length-vectors type struct.
Definition: rppdefs.h:643
RPPT Tensor Channel Offsets struct.
Definition: rppdefs.h:471
RPPT Tensor descriptor type struct.
Definition: rppdefs.h:541
RPPT Tensor 32-bit float RGB type struct.
Definition: rppdefs.h:577
RPPT Tensor 2D 32-bit float vector type struct.
Definition: rppdefs.h:596
RPPT Tensor Generic descriptor type struct.
Definition: rppdefs.h:554
RPPT Tensor 2D image patch dimensions type struct.
Definition: rppdefs.h:605
RPPT Tensor 8-bit uchar RGB type struct.
Definition: rppdefs.h:567
RPPT Tensor RpptResamplingWindow type struct.
Definition: rppdefs.h:711
RPPT Tensor 3D ROI LTFRBB struct.
Definition: rppdefs.h:481
RPPT Tensor 2D ROI LTRB struct.
Definition: rppdefs.h:462
RPPT Tensor 2D ROI XYWH struct.
Definition: rppdefs.h:490
RPPT Tensor 3D ROI XYZWHD struct.
Definition: rppdefs.h:500
RPPT Tensor strides type struct.
Definition: rppdefs.h:530
RPPT Tensor 2D 32-bit uint vector type struct.
Definition: rppdefs.h:587
RPPT Tensor random number generator state (xorwow box muller state) type struct.
Definition: rppdefs.h:622
RPPT Tensor random number generator state (xorwow state) type struct.
Definition: rppdefs.h:614
RPP HIP 2D ROI memory.
Definition: rppdefs.h:1033
RPP HIP 32-bit float memory.
Definition: rppdefs.h:968
RPP HIP 32-bit signed int memory.
Definition: rppdefs.h:992
RPP HIP 32-bit unsigned int memory.
Definition: rppdefs.h:984
RPP HIP 64-bit double memory.
Definition: rppdefs.h:976
RPP HIP 8-bit signed char memory.
Definition: rppdefs.h:1008
RPP HIP 8-bit unsigned char memory.
Definition: rppdefs.h:1000
RPP HIP RGB memory.
Definition: rppdefs.h:1016
RPP HIP 2D dimensions memory.
Definition: rppdefs.h:1024
RPP HOST memory type struct.
Definition: rppdefs.h:832
RPP OCL memory management type struct.
Definition: rppdefs.h:1044
RPP HIP-HOST memory management.
Definition: rppdefs.h:1075
RPP HOST 2D ROI memory.
Definition: rppdefs.h:822
RPP HOST 32-bit float memory.
Definition: rppdefs.h:757
RPP HOST 32-bit signed int memory.
Definition: rppdefs.h:781
RPP HOST 32-bit unsigned int memory.
Definition: rppdefs.h:773
RPP HOST 64-bit double memory.
Definition: rppdefs.h:765
RPP HOST 8-bit signed char memory.
Definition: rppdefs.h:797
RPP HOST 8-bit unsigned char memory.
Definition: rppdefs.h:789
RPP HOST RGB memory.
Definition: rppdefs.h:805
RPP HOST 2D dimensions memory.
Definition: rppdefs.h:813
RPPT Tensor 3D ROI union.
Definition: rppdefs.h:520
RPPT Tensor 2D ROI union.
Definition: rppdefs.h:510