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

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

RPP: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.2.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 )
55 
56 #define CHECK_RETURN_STATUS(x) do { \
57  int retval = (x); \
58  if (retval != 0) { \
59  fprintf(stderr, "Runtime error: %s returned %d at %s:%d", #x, retval, __FILE__, __LINE__); \
60  exit(-1); \
61  } \
62 } while (0)
63 
64 const float ONE_OVER_6 = 1.0f / 6;
65 const float ONE_OVER_3 = 1.0f / 3;
66 const float ONE_OVER_255 = 1.0f / 255;
67 const uint MMS_MAX_SCRATCH_MEMORY = 76800000; // maximum scratch memory size (number of floats) needed for MMS buffer in RNNT training
68 
69 /******************** RPP typedefs ********************/
70 
72 typedef unsigned char Rpp8u;
74 typedef signed char Rpp8s;
76 typedef unsigned short Rpp16u;
78 typedef short Rpp16s;
80 typedef unsigned int Rpp32u;
82 typedef int Rpp32s;
84 typedef unsigned long long Rpp64u;
86 typedef long long Rpp64s;
88 typedef float Rpp32f;
90 typedef double Rpp64f;
92 typedef void* RppPtr_t;
94 typedef size_t RppSize_t;
95 
99 typedef enum
100 {
104  RPP_ERROR = -1,
150 
154 typedef enum
155 {
156  rppStatusSuccess = 0,
157  rppStatusBadParm = -1,
158  rppStatusUnknownError = -2,
159  rppStatusNotInitialized = -3,
160  rppStatusInvalidValue = -4,
161  rppStatusAllocFailed = -5,
162  rppStatusInternalError = -6,
163  rppStatusNotImplemented = -7,
164  rppStatusUnsupportedOp = -8,
165 } rppStatus_t;
166 
170 typedef enum
171 {
172  RPP_SCALAR_OP_AND = 1,
173  RPP_SCALAR_OP_OR,
174  RPP_SCALAR_OP_XOR,
175  RPP_SCALAR_OP_NAND,
176  RPP_SCALAR_OP_EQUAL,
177  RPP_SCALAR_OP_NOTEQUAL,
178  RPP_SCALAR_OP_LESS,
179  RPP_SCALAR_OP_LESSEQ,
180  RPP_SCALAR_OP_GREATER,
181  RPP_SCALAR_OP_GREATEREQ,
182  RPP_SCALAR_OP_ADD,
183  RPP_SCALAR_OP_SUBTRACT,
184  RPP_SCALAR_OP_MULTIPLY,
185  RPP_SCALAR_OP_DIVIDE,
186  RPP_SCALAR_OP_MODULUS,
187  RPP_SCALAR_OP_MIN,
188  RPP_SCALAR_OP_MAX,
189 } RppOp;
190 
194 typedef enum
195 {
196  U8_S8,
197  S8_U8,
199 
203 typedef struct
204 {
205  Rpp32f rho;
206  Rpp32f theta;
207 } RppPointPolar;
208 
212 typedef struct
213 {
214  Rpp32u channelParam;
215  Rpp32u bufferMultiplier;
217 
221 typedef struct
222 {
223  Rpp32f data[6];
224 } Rpp32f6;
225 
229 typedef struct
230 {
231  Rpp32s data[24];
232 } Rpp32s24;
233 
237 typedef struct
238 {
239  Rpp32f data[24];
240 } Rpp32f24;
241 
242 /******************** RPPI typedefs ********************/
243 
247 typedef enum
248 {
249  RGB_HSV = 1,
250  HSV_RGB
252 
256 typedef enum
257 {
258  RPPI_LOW,
259  RPPI_MEDIUM,
260  RPPI_HIGH
262 
266 typedef enum
267 {
268  RPPI_CHN_PLANAR,
269  RPPI_CHN_PACKED
270 } RppiChnFormat;
271 
275 typedef enum
276 {
277  RPPI_HORIZONTAL_AXIS,
278  RPPI_VERTICAL_AXIS,
279  RPPI_BOTH_AXIS
280 } RppiAxis;
281 
285 typedef enum
286 {
287  GAUSS3,
288  GAUSS5,
289  GAUSS3x1,
290  GAUSS1x3,
291  AVG3 = 10,
292  AVG5
293 } RppiBlur;
294 
298 typedef enum
299 {
300  ZEROPAD,
301  NOPAD
302 } RppiPad;
303 
307 typedef enum
308 {
309  RGB,
310  HSV
311 } RppiFormat;
312 
316 typedef struct
317 {
318  unsigned int width;
319  unsigned int height;
320 } RppiSize;
321 
325 typedef struct
326 {
327  int x;
328  int y;
329 } RppiPoint;
330 
334 typedef struct
335 {
336  int x;
337  int y;
338  int z;
339 } RppiPoint3D;
340 
344 typedef struct
345 {
346  int x;
347  int y;
348  int width;
349  int height;
350 } RppiRect;
351 
355 typedef struct
356 {
357  unsigned int x;
358  unsigned int y;
359  unsigned int roiWidth;
360  unsigned int roiHeight;
361 } RppiROI;
362 
363 /******************** RPPT typedefs ********************/
364 
368 typedef enum
369 {
370  U8,
371  F32,
372  F16,
373  I8
374 } RpptDataType;
375 
379 typedef enum
380 {
381  NCHW, // BatchSize-Channels-Height-Width
382  NHWC, // BatchSize-Height-Width-Channels
383  NCDHW, // BatchSize-Channels-Depth-Height-Width
384  NDHWC, // BatchSize-Depth-Height-Width-Channels
385  NHW, // BatchSize-Height-Width
386  NFT, // BatchSize-Frequency-Time -> Frequency Major used for Spectrogram / MelfilterBank
387  NTF // BatchSize-Time-Frequency -> Time Major used for Spectrogram / MelfilterBank
388 } RpptLayout;
389 
393 typedef enum
394 {
395  LTRB, // Left-Top-Right-Bottom
396  XYWH // X-Y-Width-Height
397 } RpptRoiType;
398 
402 typedef enum
403 {
404  LTFRBB, // Left-Top-Front-Right-Bottom-Back
405  XYZWHD // X-Y-Z-Width-Height-Depth
406 } RpptRoi3DType;
407 
411 typedef enum
412 {
413  RGBtype,
414  BGRtype
416 
420 typedef enum
421 {
422  NEAREST_NEIGHBOR = 0,
423  BILINEAR,
424  BICUBIC,
425  LANCZOS,
426  GAUSSIAN,
427  TRIANGULAR
429 
433 typedef enum
434 {
435  ZERO = 0,
436  CLAMP,
437  REFLECT
439 
443 typedef enum
444 {
445  SLANEY = 0, // Follows Slaney’s MATLAB Auditory Modelling Work behavior
446  HTK, // Follows O’Shaughnessy’s book formula, consistent with Hidden Markov Toolkit(HTK), m = 2595 * log10(1 + (f/700))
448 
452 typedef struct
453 {
454  RppiPoint lt, rb; // Left-Top point and Right-Bottom point
455 
456 } RpptRoiLtrb;
457 
461 typedef struct
462 {
463  RppiPoint r;
464  RppiPoint g;
465  RppiPoint b;
467 
471 typedef struct
472 {
473  RppiPoint3D ltf, rbb; // Left-Top-Front point and Right-Bottom-Back point
474 
475 } RpptRoiLtfrbb;
476 
480 typedef struct
481 {
482  RppiPoint xy;
483  int roiWidth, roiHeight;
484 
485 } RpptRoiXywh;
486 
490 typedef struct
491 {
492  RppiPoint3D xyz;
493  int roiWidth, roiHeight, roiDepth;
494 
495 } RpptRoiXyzwhd;
496 
500 typedef union
501 {
502  RpptRoiLtrb ltrbROI; // ROI defined as Left-Top-Right-Bottom
503  RpptRoiXywh xywhROI; // ROI defined as X-Y-Width-Height
504 
505 } RpptROI, *RpptROIPtr;
506 
510 typedef union
511 {
512  RpptRoiLtfrbb ltfrbbROI; // ROI defined as Left-Top-Front-Right-Bottom-Back
513  RpptRoiXyzwhd xyzwhdROI; // ROI defined as X-Y-Z-Width-Height-Depth
514 
516 
520 typedef struct
521 {
522  Rpp32u nStride;
523  Rpp32u cStride;
524  Rpp32u hStride;
525  Rpp32u wStride;
526 } RpptStrides;
527 
531 typedef struct
532 {
533  RppSize_t numDims;
534  Rpp32u offsetInBytes;
535  RpptDataType dataType;
536  Rpp32u n, c, h, w;
537  RpptStrides strides;
538  RpptLayout layout;
540 
544 typedef struct
545 {
546  RppSize_t numDims;
547  Rpp32u offsetInBytes;
548  RpptDataType dataType;
549  Rpp32u dims[RPPT_MAX_DIMS];
550  Rpp32u strides[RPPT_MAX_DIMS];
551  RpptLayout layout;
553 
557 typedef struct
558 {
559  Rpp8u R;
560  Rpp8u G;
561  Rpp8u B;
562 } RpptRGB;
563 
567 typedef struct
568 {
569  Rpp32f R;
570  Rpp32f G;
571  Rpp32f B;
572 } RpptFloatRGB;
573 
577 typedef struct
578 {
579  Rpp32u x;
580  Rpp32u y;
582 
586 typedef struct
587 {
588  Rpp32f x;
589  Rpp32f y;
591 
595 typedef struct
596 {
597  Rpp32u width;
598  Rpp32u height;
600 
604 typedef struct
605 { Rpp32u x[5];
606  Rpp32u counter;
608 
612 typedef struct
613 { Rpp32s x[5];
614  Rpp32s counter;
615  int boxMullerFlag;
616  float boxMullerExtra;
618 
622 typedef struct
623 {
624  Rpp32s24 srcLocsTL;
625  Rpp32s24 srcLocsTR;
626  Rpp32s24 srcLocsBL;
627  Rpp32s24 srcLocsBR;
629 
633 typedef struct
634 {
635  Rpp32f24 srcValsTL;
636  Rpp32f24 srcValsTR;
637  Rpp32f24 srcValsBL;
638  Rpp32f24 srcValsBR;
640 
644 typedef struct GenericFilter
645 {
646  Rpp32f scale = 1.0f;
647  Rpp32f radius = 1.0f;
648  Rpp32s size;
649  GenericFilter(RpptInterpolationType interpolationType, Rpp32s in_size, Rpp32s out_size, Rpp32f scaleRatio)
650  {
651  switch(interpolationType)
652  {
653  case RpptInterpolationType::BICUBIC:
654  {
655  this->radius = 2.0f;
656  break;
657  }
658  case RpptInterpolationType::LANCZOS:
659  {
660  if(in_size > out_size)
661  {
662  this->radius = 3.0f * scaleRatio;
663  this->scale = (1 / scaleRatio);
664  }
665  else
666  this->radius = 3.0f;
667  break;
668  }
669  case RpptInterpolationType::GAUSSIAN:
670  {
671  if(in_size > out_size)
672  {
673  this->radius = scaleRatio;
674  this->scale = (1 / scaleRatio);
675  }
676  break;
677  }
678  case RpptInterpolationType::TRIANGULAR:
679  {
680  if(in_size > out_size)
681  {
682  this->radius = scaleRatio;
683  this->scale = (1 / scaleRatio);
684  }
685  break;
686  }
687  default:
688  {
689  this->radius = 1.0f;
690  this->scale = 1.0f;
691  break;
692  }
693  }
694  this->size = std::ceil(2 * this->radius);
695  }
697 
701 typedef struct RpptResamplingWindow
702 {
703  inline void input_range(Rpp32f x, Rpp32s *loc0, Rpp32s *loc1)
704  {
705  Rpp32s xc = std::ceil(x);
706  *loc0 = xc - lobes;
707  *loc1 = xc + lobes;
708  }
709 
710  inline Rpp32f operator()(Rpp32f x)
711  {
712  Rpp32f locRaw = x * scale + center;
713  Rpp32s locFloor = std::floor(locRaw);
714  Rpp32f weight = locRaw - locFloor;
715  locFloor = std::max(std::min(locFloor, lookupSize - 2), 0);
716  Rpp32f current = lookup[locFloor];
717  Rpp32f next = lookup[locFloor + 1];
718  return current + weight * (next - current);
719  }
720 
721  inline __m128 operator()(__m128 x)
722  {
723  __m128 pLocRaw = _mm_add_ps(_mm_mul_ps(x, pScale), pCenter);
724  __m128i pxLocFloor = _mm_cvttps_epi32(pLocRaw);
725  __m128 pLocFloor = _mm_cvtepi32_ps(pxLocFloor);
726  __m128 pWeight = _mm_sub_ps(pLocRaw, pLocFloor);
727  Rpp32s idx[4];
728  _mm_storeu_si128(reinterpret_cast<__m128i*>(idx), pxLocFloor);
729  __m128 pCurrent = _mm_setr_ps(lookup[idx[0]], lookup[idx[1]], lookup[idx[2]], lookup[idx[3]]);
730  __m128 pNext = _mm_setr_ps(lookup[idx[0] + 1], lookup[idx[1] + 1], lookup[idx[2] + 1], lookup[idx[3] + 1]);
731  return _mm_add_ps(pCurrent, _mm_mul_ps(pWeight, _mm_sub_ps(pNext, pCurrent)));
732  }
733 
734  Rpp32f scale = 1, center = 1;
735  Rpp32s lobes = 0, coeffs = 0;
736  Rpp32s lookupSize = 0;
737  std::vector<Rpp32f> lookup;
738  __m128 pCenter, pScale;
740 
741 /******************** HOST memory typedefs ********************/
742 
746 typedef struct
747 {
748  Rpp32f *floatmem;
749 } memRpp32f;
750 
754 typedef struct
755 {
756  Rpp64f *doublemem;
757 } memRpp64f;
758 
762 typedef struct
763 {
764  Rpp32u *uintmem;
765 } memRpp32u;
766 
770 typedef struct
771 {
772  Rpp32s *intmem;
773 } memRpp32s;
774 
778 typedef struct
779 {
780  Rpp8u *ucharmem;
781 } memRpp8u;
782 
786 typedef struct
787 {
788  Rpp8s *charmem;
789 } memRpp8s;
790 
794 typedef struct
795 {
796  RpptRGB* rgbmem;
797 } memRpptRGB;
798 
802 typedef struct
803 {
804  Rpp32u *height;
805  Rpp32u *width;
806 } memSize;
807 
811 typedef struct
812 {
813  Rpp32u *x;
814  Rpp32u *y;
815  Rpp32u *roiHeight;
816  Rpp32u *roiWidth;
817 } memROI;
818 
822 typedef struct {
823  RppiSize *srcSize;
824  RppiSize *dstSize;
825  RppiSize *maxSrcSize;
826  RppiSize *maxDstSize;
827  RppiROI *roiPoints;
828  memRpp32f floatArr[10];
829  memRpp64f doubleArr[10];
830  memRpp32u uintArr[10];
831  memRpp32s intArr[10];
832  memRpp8u ucharArr[10];
833  memRpp8s charArr[10];
834  memRpptRGB rgbArr;
835  Rpp64u *srcBatchIndex;
836  Rpp64u *dstBatchIndex;
837  Rpp32u *inc;
838  Rpp32u *dstInc;
839  Rpp32f *scratchBufferHost;
840 } memCPU;
841 
842 #ifdef OCL_COMPILE
843 
844 /******************** OCL memory typedefs ********************/
845 
849 typedef struct
850 {
851  cl_mem floatmem;
852 } clmemRpp32f;
853 
857 typedef struct
858 {
859  cl_mem doublemem;
860 } clmemRpp64f;
861 
865 typedef struct
866 {
867  cl_mem uintmem;
868 } clmemRpp32u;
869 
873 typedef struct
874 {
875  cl_mem intmem;
876 } clmemRpp32s;
877 
881 typedef struct
882 {
883  cl_mem ucharmem;
884 } clmemRpp8u;
885 
889 typedef struct
890 {
891  cl_mem charmem;
892 } clmemRpp8s;
893 
897 typedef struct
898 {
899  cl_mem height;
900  cl_mem width;
901 } clmemSize;
902 
906 typedef struct
907 {
908  cl_mem x;
909  cl_mem y;
910  cl_mem roiHeight;
911  cl_mem roiWidth;
912 } clmemROI;
913 
917 typedef struct
918 {
919  memSize csrcSize;
920  memSize cdstSize;
921  memSize cmaxSrcSize;
922  memSize cmaxDstSize;
923  memROI croiPoints;
924  clmemSize srcSize;
925  clmemSize dstSize;
926  clmemSize maxSrcSize;
927  clmemSize maxDstSize;
928  clmemROI roiPoints;
929  clmemRpp32f floatArr[10];
930  clmemRpp64f doubleArr[10];
931  clmemRpp32u uintArr[10];
932  clmemRpp32s intArr[10];
933  clmemRpp8u ucharArr[10];
934  clmemRpp8s charArr[10];
935  cl_mem srcBatchIndex;
936  cl_mem dstBatchIndex;
937  cl_mem inc;
938  cl_mem dstInc;
939 } memGPU;
940 
944 typedef struct
945 {
946  memCPU mcpu;
947  memGPU mgpu;
948 } memMgmt;
949 
950 #elif defined(HIP_COMPILE)
951 
952 /******************** HIP memory typedefs ********************/
953 
957 typedef struct
958 {
959  Rpp32f* floatmem;
960 } hipMemRpp32f;
961 
965 typedef struct
966 {
967  Rpp64f* doublemem;
968 } hipMemRpp64f;
969 
973 typedef struct
974 {
975  Rpp32u* uintmem;
976 } hipMemRpp32u;
977 
981 typedef struct
982 {
983  Rpp32s* intmem;
984 } hipMemRpp32s;
985 
989 typedef struct
990 {
991  Rpp8u* ucharmem;
992 } hipMemRpp8u;
993 
997 typedef struct
998 {
999  Rpp8s* charmem;
1000 } hipMemRpp8s;
1001 
1005 typedef struct
1006 {
1007  RpptRGB* rgbmem;
1008 } hipMemRpptRGB;
1009 
1013 typedef struct
1014 {
1015  Rpp32u* height;
1016  Rpp32u* width;
1017 } hipMemSize;
1018 
1022 typedef struct
1023 {
1024  Rpp32u* x;
1025  Rpp32u* y;
1026  Rpp32u* roiHeight;
1027  Rpp32u* roiWidth;
1028 } hipMemROI;
1029 
1033 typedef struct
1034 {
1035  memSize csrcSize;
1036  memSize cdstSize;
1037  memSize cmaxSrcSize;
1038  memSize cmaxDstSize;
1039  memROI croiPoints;
1040  hipMemSize srcSize;
1041  hipMemSize dstSize;
1042  hipMemSize maxSrcSize;
1043  hipMemSize maxDstSize;
1044  hipMemROI roiPoints;
1045  hipMemRpp32f floatArr[10];
1046  hipMemRpp32f float3Arr[10];
1047  hipMemRpp64f doubleArr[10];
1048  hipMemRpp32u uintArr[10];
1049  hipMemRpp32s intArr[10];
1050  hipMemRpp8u ucharArr[10];
1051  hipMemRpp8s charArr[10];
1052  hipMemRpptRGB rgbArr;
1053  hipMemRpp32f scratchBufferHip;
1054  Rpp64u* srcBatchIndex;
1055  Rpp64u* dstBatchIndex;
1056  Rpp32u* inc;
1057  Rpp32u* dstInc;
1058  hipMemRpp32u scratchBuf;
1059 } memGPU;
1060 
1064 typedef struct
1065 {
1066  memCPU mcpu;
1067  memGPU mgpu;
1068 } memMgmt;
1069 
1070 #else
1071 
1075 typedef struct
1076 {
1077  memCPU mcpu;
1078 } memMgmt;
1079 
1080 #endif //BACKEND
1081 
1085 typedef struct
1086 {
1087  RppPtr_t cpuHandle;
1088  Rpp32u nbatchSize;
1089  memMgmt mem;
1090 } InitHandle;
1091 
1092 #endif /* RPPDEFS_H */
RppiPad
RPPI Image pad type enum.
Definition: rppdefs.h:299
RppiFormat
RPPI Image format type enum.
Definition: rppdefs.h:308
unsigned int Rpp32u
32 bit unsigned int
Definition: rppdefs.h:80
RppConvertBitDepthMode
RPP BitDepth Conversion type enum.
Definition: rppdefs.h:195
int Rpp32s
32 bit signed int
Definition: rppdefs.h:82
signed char Rpp8s
8 bit signed char
Definition: rppdefs.h:74
RppiChnFormat
RPPI Image channel format type enum.
Definition: rppdefs.h:267
RpptMelScaleFormula
RPPT Mel Scale Formula.
Definition: rppdefs.h:444
unsigned short Rpp16u
16 bit unsigned short
Definition: rppdefs.h:76
unsigned char Rpp8u
8 bit unsigned char
Definition: rppdefs.h:72
void * RppPtr_t
void pointer
Definition: rppdefs.h:92
RpptLayout
RPPT Tensor layout type enum.
Definition: rppdefs.h:380
RppiBlur
RPPI Image blur type enum.
Definition: rppdefs.h:286
RppiAxis
RPP Image axis type enum.
Definition: rppdefs.h:276
RpptRoiType
RPPT Tensor 2D ROI type enum.
Definition: rppdefs.h:394
RpptDataType
RPPT Tensor datatype enum.
Definition: rppdefs.h:369
struct RpptResamplingWindow RpptResamplingWindow
RPPT Tensor RpptResamplingWindow type struct.
double Rpp64f
64 bit double
Definition: rppdefs.h:90
RpptAudioBorderType
RPPT Audio Border Type.
Definition: rppdefs.h:434
size_t RppSize_t
size_t
Definition: rppdefs.h:94
struct GenericFilter GenericFilter
RPPT Tensor GenericFilter type struct.
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:100
RpptRoi3DType
RPPT Tensor 3D ROI type enum.
Definition: rppdefs.h:403
RppOp
RPP Operations type enum.
Definition: rppdefs.h:171
unsigned long long Rpp64u
64 bit unsigned long long
Definition: rppdefs.h:84
#define RPPT_MAX_DIMS
RPP maximum dimensions in tensor .
Definition: rppdefs.h:54
RpptInterpolationType
RPPT Tensor interpolation type enum.
Definition: rppdefs.h:421
RpptSubpixelLayout
RPPT Tensor subpixel layout type enum.
Definition: rppdefs.h:412
short Rpp16s
16 bit signed short
Definition: rppdefs.h:78
RppiColorConvertMode
RPPI Image color convert mode type enum.
Definition: rppdefs.h:248
float Rpp32f
32 bit float
Definition: rppdefs.h:88
RppiFuzzyLevel
RPPI Image fuzzy level type enum.
Definition: rppdefs.h:257
long long Rpp64s
64 bit long long
Definition: rppdefs.h:86
rppStatus_t
RPP rppStatus_t type enums.
Definition: rppdefs.h:155
@ RPP_ERROR_NOT_IMPLEMENTED
Function variant requested is not implemented / unsupported.
Definition: rppdefs.h:114
@ RPP_ERROR_INVALID_DST_DATATYPE
Invalid dst tensor datatype. (Needs to adhere to function specification.)
Definition: rppdefs.h:126
@ RPP_ERROR_INVALID_OUTPUT_TILE_LENGTH
Invalid output tile length (Needs to adhere to function specification.)
Definition: rppdefs.h:142
@ RPP_ERROR_OUT_OF_BOUND_SRC_ROI
Out of bound source ROI.
Definition: rppdefs.h:136
@ 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:144
@ RPP_ERROR_ZERO_DIVISION
Arguments provided will result in zero division error.
Definition: rppdefs.h:110
@ RPP_ERROR_INVALID_ARGUMENTS
One or more arguments invalid. (Needs to adhere to function specification.)
Definition: rppdefs.h:106
@ RPP_ERROR_LAYOUT_MISMATCH
src and dst layout mismatch
Definition: rppdefs.h:138
@ RPP_ERROR_INVALID_CHANNELS
Number of channels is invalid. (Needs to adhere to function specification.)
Definition: rppdefs.h:140
@ RPP_ERROR_INVALID_SRC_CHANNELS
Invalid src tensor number of channels. (Needs to adhere to function specification....
Definition: rppdefs.h:116
@ RPP_ERROR_INVALID_SRC_OR_DST_DATATYPE
Invalid src/dst tensor datatype. (Needs to adhere to function specification.)
Definition: rppdefs.h:128
@ RPP_ERROR_INVALID_PARAMETER_DATATYPE
Invalid datatype.
Definition: rppdefs.h:132
@ RPP_ERROR_NOT_ENOUGH_MEMORY
Not enough memory to write outputs, as per dim-lengths and strides set in descriptor.
Definition: rppdefs.h:134
@ RPP_ERROR
Unspecified error.
Definition: rppdefs.h:104
@ RPP_ERROR_INVALID_SRC_DIMS
Number of src dims is invalid. (Needs to adhere to function specification.)
Definition: rppdefs.h:148
@ 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:146
@ RPP_ERROR_INVALID_DST_LAYOUT
Invalid dst tensor layout. (Needs to adhere to function specification.)
Definition: rppdefs.h:122
@ RPP_ERROR_INVALID_DST_CHANNELS
Invalid dst tensor number of channels. (Needs to adhere to function specification....
Definition: rppdefs.h:118
@ RPP_ERROR_INVALID_SRC_DATATYPE
Invalid src tensor datatype. (Needs to adhere to function specification.)
Definition: rppdefs.h:124
@ RPP_ERROR_INVALID_SRC_LAYOUT
Invalid src tensor layout. (Needs to adhere to function specification.)
Definition: rppdefs.h:120
@ RPP_ERROR_HIGH_SRC_DIMENSION
Src tensor / src ROI dimension too high. (Needs to adhere to function specification....
Definition: rppdefs.h:112
@ RPP_SUCCESS
No error.
Definition: rppdefs.h:102
@ RPP_ERROR_INSUFFICIENT_DST_BUFFER_LENGTH
Insufficient dst buffer length provided. (Needs to adhere to function specification....
Definition: rppdefs.h:130
@ RPP_ERROR_LOW_OFFSET
Low tensor offsetInBytes provided for src/dst tensor.
Definition: rppdefs.h:108
RPPT Tensor GenericFilter type struct.
Definition: rppdefs.h:645
RPP initialize handle.
Definition: rppdefs.h:1086
RPP 24 float vector.
Definition: rppdefs.h:238
RPP 6 float vector.
Definition: rppdefs.h:222
RPP 24 signed int vector.
Definition: rppdefs.h:230
RPP layout params.
Definition: rppdefs.h:213
RPP polar point.
Definition: rppdefs.h:204
RPPI Image 3D point type struct.
Definition: rppdefs.h:335
RPPI Image 2D cartesian point type struct.
Definition: rppdefs.h:326
RPPI Image 2D ROI (XYWH format) type struct.
Definition: rppdefs.h:356
RPPI Image 2D Rectangle (XYWH format) type struct.
Definition: rppdefs.h:345
RPPI Image size(Width/Height dimensions) type struct.
Definition: rppdefs.h:317
RPPT Tensor 2D bilinear neighborhood 32-bit signed int 8-length-vectors type struct.
Definition: rppdefs.h:623
RPPT Tensor 2D bilinear neighborhood 32-bit float 8-length-vectors type struct.
Definition: rppdefs.h:634
RPPT Tensor Channel Offsets struct.
Definition: rppdefs.h:462
RPPT Tensor descriptor type struct.
Definition: rppdefs.h:532
RPPT Tensor 32-bit float RGB type struct.
Definition: rppdefs.h:568
RPPT Tensor 2D 32-bit float vector type struct.
Definition: rppdefs.h:587
RPPT Tensor Generic descriptor type struct.
Definition: rppdefs.h:545
RPPT Tensor 2D image patch dimensions type struct.
Definition: rppdefs.h:596
RPPT Tensor 8-bit uchar RGB type struct.
Definition: rppdefs.h:558
RPPT Tensor RpptResamplingWindow type struct.
Definition: rppdefs.h:702
RPPT Tensor 3D ROI LTFRBB struct.
Definition: rppdefs.h:472
RPPT Tensor 2D ROI LTRB struct.
Definition: rppdefs.h:453
RPPT Tensor 2D ROI XYWH struct.
Definition: rppdefs.h:481
RPPT Tensor 3D ROI XYZWHD struct.
Definition: rppdefs.h:491
RPPT Tensor strides type struct.
Definition: rppdefs.h:521
RPPT Tensor 2D 32-bit uint vector type struct.
Definition: rppdefs.h:578
RPPT Tensor random number generator state (xorwow box muller state) type struct.
Definition: rppdefs.h:613
RPPT Tensor random number generator state (xorwow state) type struct.
Definition: rppdefs.h:605
RPP HIP 2D ROI memory.
Definition: rppdefs.h:1023
RPP HIP 32-bit float memory.
Definition: rppdefs.h:958
RPP HIP 32-bit signed int memory.
Definition: rppdefs.h:982
RPP HIP 32-bit unsigned int memory.
Definition: rppdefs.h:974
RPP HIP 64-bit double memory.
Definition: rppdefs.h:966
RPP HIP 8-bit signed char memory.
Definition: rppdefs.h:998
RPP HIP 8-bit unsigned char memory.
Definition: rppdefs.h:990
RPP HIP RGB memory.
Definition: rppdefs.h:1006
RPP HIP 2D dimensions memory.
Definition: rppdefs.h:1014
RPP HOST memory type struct.
Definition: rppdefs.h:822
RPP OCL memory management type struct.
Definition: rppdefs.h:1034
RPP HIP-HOST memory management.
Definition: rppdefs.h:1065
RPP HOST 2D ROI memory.
Definition: rppdefs.h:812
RPP HOST 32-bit float memory.
Definition: rppdefs.h:747
RPP HOST 32-bit signed int memory.
Definition: rppdefs.h:771
RPP HOST 32-bit unsigned int memory.
Definition: rppdefs.h:763
RPP HOST 64-bit double memory.
Definition: rppdefs.h:755
RPP HOST 8-bit signed char memory.
Definition: rppdefs.h:787
RPP HOST 8-bit unsigned char memory.
Definition: rppdefs.h:779
RPP HOST RGB memory.
Definition: rppdefs.h:795
RPP HOST 2D dimensions memory.
Definition: rppdefs.h:803
RPPT Tensor 3D ROI union.
Definition: rppdefs.h:511
RPPT Tensor 2D ROI union.
Definition: rppdefs.h:501