include/rppi_arithmetic_operations.h Source File

include/rppi_arithmetic_operations.h Source File#

RPP: include/rppi_arithmetic_operations.h Source File
rppi_arithmetic_operations.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 RPPI_ARITHMATIC_OPERATIONS_H
26 #define RPPI_ARITHMATIC_OPERATIONS_H
27 
28 #include "rppdefs.h"
29 #include "rpp.h"
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
46 /******************** add ********************/
47 
48 // Adds corresponding pixels of two batches of images
49 
50 // *param[in] srcPtr1 Input image1 batch
51 // *param[in] srcPtr2 Input image2 batch
52 // *param[in] srcSize Array containing an RppiSize for each image in the batch
53 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
54 // *param[out] dstPtr Output image batch
55 // *param[in] nbatchSize Batch size or the number of images in the batch
56 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
57 // *returns a RppStatus enumeration.
58 // *retval RPP_SUCCESS : No error, Succesful completion
59 // *retval RPP_ERROR : Error
60 
61 RppStatus rppi_add_u8_pln1_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
62 RppStatus rppi_add_u8_pln3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
63 RppStatus rppi_add_u8_pkd3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
64 #ifdef GPU_SUPPORT
65 RppStatus rppi_add_u8_pln1_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
66 RppStatus rppi_add_u8_pln3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
67 RppStatus rppi_add_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
68 #endif // GPU_SUPPORT
69 
70 /******************** subtract ********************/
71 
72 // Subtracts corresponding pixels of two batches of images
73 
74 // *param[in] srcPtr1 Input image1 batch
75 // *param[in] srcPtr2 Input image2 batch
76 // *param[in] srcSize Array containing an RppiSize for each image in the batch
77 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
78 // *param[out] dstPtr Output image batch
79 // *param[in] nbatchSize Batch size or the number of images in the batch
80 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
81 // *returns a RppStatus enumeration.
82 // *retval RPP_SUCCESS : No error, Succesful completion
83 // *retval RPP_ERROR : Error
84 
85 RppStatus rppi_subtract_u8_pln1_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
86 RppStatus rppi_subtract_u8_pln3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
87 RppStatus rppi_subtract_u8_pkd3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
88 #ifdef GPU_SUPPORT
89 RppStatus rppi_subtract_u8_pln1_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
90 RppStatus rppi_subtract_u8_pln3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
91 RppStatus rppi_subtract_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
92 #endif // GPU_SUPPORT
93 
94 /******************** multiply ********************/
95 
96 // Multiplies corresponding pixels of two batches of images
97 
98 // *param[in] srcPtr1 Input image1 batch
99 // *param[in] srcPtr2 Input image2 batch
100 // *param[in] srcSize Array containing an RppiSize for each image in the batch
101 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
102 // *param[out] dstPtr Output image batch
103 // *param[in] nbatchSize Batch size or the number of images in the batch
104 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
105 // *returns a RppStatus enumeration.
106 // *retval RPP_SUCCESS : No error, Succesful completion
107 // *retval RPP_ERROR : Error
108 
109 RppStatus rppi_multiply_u8_pln1_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
110 RppStatus rppi_multiply_u8_pln3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
111 RppStatus rppi_multiply_u8_pkd3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
112 #ifdef GPU_SUPPORT
113 RppStatus rppi_multiply_u8_pln1_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
114 RppStatus rppi_multiply_u8_pln3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
115 RppStatus rppi_multiply_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
116 #endif // GPU_SUPPORT
117 
118 /******************** absolute_difference ********************/
119 
120 // Computes absolute differnece of corresponding pixels of two batches of images
121 
122 // *param[in] srcPtr1 Input image1 batch
123 // *param[in] srcPtr2 Input image2 batch
124 // *param[in] srcSize Array containing an RppiSize for each image in the batch
125 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
126 // *param[out] dstPtr Output image batch
127 // *param[in] nbatchSize Batch size or the number of images in the batch
128 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
129 // *returns a RppStatus enumeration.
130 // *retval RPP_SUCCESS : No error, Succesful completion
131 // *retval RPP_ERROR : Error
132 
133 RppStatus rppi_absolute_difference_u8_pln1_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
134 RppStatus rppi_absolute_difference_u8_pln3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
135 RppStatus rppi_absolute_difference_u8_pkd3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
136 #ifdef GPU_SUPPORT
137 RppStatus rppi_absolute_difference_u8_pln1_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
138 RppStatus rppi_absolute_difference_u8_pln3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
139 RppStatus rppi_absolute_difference_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
140 #endif // GPU_SUPPORT
141 
142 /******************** phase ********************/
143 
144 // Computes phase of corresponding pixels of two batches of images
145 
146 // *param[in] srcPtr1 Input image1 batch
147 // *param[in] srcPtr2 Input image2 batch
148 // *param[in] srcSize Array containing an RppiSize for each image in the batch
149 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
150 // *param[out] dstPtr Output image batch
151 // *param[in] nbatchSize Batch size or the number of images in the batch
152 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
153 // *returns a RppStatus enumeration.
154 // *retval RPP_SUCCESS : No error, Succesful completion
155 // *retval RPP_ERROR : Error
156 
157 RppStatus rppi_phase_u8_pln1_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
158 RppStatus rppi_phase_u8_pln3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
159 RppStatus rppi_phase_u8_pkd3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
160 #ifdef GPU_SUPPORT
161 RppStatus rppi_phase_u8_pln1_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
162 RppStatus rppi_phase_u8_pln3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
163 RppStatus rppi_phase_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
164 #endif // GPU_SUPPORT
165 
166 /******************** magnitude ********************/
167 
168 // Computes magnitude of corresponding pixels of two batches of images
169 
170 // *param[in] srcPtr1 Input image1 batch
171 // *param[in] srcPtr2 Input image2 batch
172 // *param[in] srcSize Array containing an RppiSize for each image in the batch
173 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
174 // *param[out] dstPtr Output image batch
175 // *param[in] nbatchSize Batch size or the number of images in the batch
176 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
177 // *returns a RppStatus enumeration.
178 // *retval RPP_SUCCESS : No error, Succesful completion
179 // *retval RPP_ERROR : Error
180 
181 RppStatus rppi_magnitude_u8_pln1_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
182 RppStatus rppi_magnitude_u8_pln3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
183 RppStatus rppi_magnitude_u8_pkd3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
184 #ifdef GPU_SUPPORT
185 RppStatus rppi_magnitude_u8_pln1_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
186 RppStatus rppi_magnitude_u8_pln3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
187 RppStatus rppi_magnitude_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
188 #endif // GPU_SUPPORT
189 
190 /******************** accumulate ********************/
191 
192 // Accumulates corresponding pixels of two batches of images, into the first batch
193 
194 // *param[in/out] srcPtr1 Input image1 batch
195 // *param[in] srcPtr2 Input image2 batch
196 // *param[in] srcSize Array containing an RppiSize for each image in the batch
197 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
198 // *param[in] nbatchSize Batch size or the number of images in the batch
199 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
200 // *returns a RppStatus enumeration.
201 // *retval RPP_SUCCESS : No error, Succesful completion
202 // *retval RPP_ERROR : Error
203 
204 RppStatus rppi_accumulate_u8_pln1_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
205 RppStatus rppi_accumulate_u8_pln3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
206 RppStatus rppi_accumulate_u8_pkd3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
207 #ifdef GPU_SUPPORT
208 RppStatus rppi_accumulate_u8_pln1_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
209 RppStatus rppi_accumulate_u8_pln3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
210 RppStatus rppi_accumulate_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
211 #endif // GPU_SUPPORT
212 
213 /******************** accumulate_weighted ********************/
214 
215 // Alpha-blends corresponding pixels of two batches of images, into the first batch
216 
217 // *param[in/out] srcPtr1 Input image1 batch
218 // *param[in] srcPtr2 Input image2 batch
219 // *param[in] srcSize Array containing an RppiSize for each image in the batch
220 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
221 // *param[in] alpha Array of floats containing one alpha value for each image in the batch
222 // *param[in] nbatchSize Batch size or the number of images in the batch
223 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
224 // *returns a RppStatus enumeration.
225 // *retval RPP_SUCCESS : No error, Succesful completion
226 // *retval RPP_ERROR : Error
227 
228 RppStatus rppi_accumulate_weighted_u8_pln1_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
229 RppStatus rppi_accumulate_weighted_u8_pln3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
230 RppStatus rppi_accumulate_weighted_u8_pkd3_batchPD_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
231 #ifdef GPU_SUPPORT
232 RppStatus rppi_accumulate_weighted_u8_pln1_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
233 RppStatus rppi_accumulate_weighted_u8_pln3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
234 RppStatus rppi_accumulate_weighted_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32f *alpha, Rpp32u nbatchSize, rppHandle_t rppHandle);
235 #endif // GPU_SUPPORT
236 
237 /******************** accumulate_squared ********************/
238 
239 // Squares pixel values of a batch of images in-place
240 
241 // *param[in/out] srcPtr Input image
242 // *param[in] srcSize Array containing an RppiSize for each image in the batch
243 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
244 // *param[in] nbatchSize Batch size or the number of images in the batch
245 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
246 // *returns a RppStatus enumeration.
247 // *retval RPP_SUCCESS : No error, Succesful completion
248 // *retval RPP_ERROR : Error
249 
250 RppStatus rppi_accumulate_squared_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
251 RppStatus rppi_accumulate_squared_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
252 RppStatus rppi_accumulate_squared_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
253 #ifdef GPU_SUPPORT
254 RppStatus rppi_accumulate_squared_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
255 RppStatus rppi_accumulate_squared_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
256 RppStatus rppi_accumulate_squared_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
257 #endif // GPU_SUPPORT
258 
259 /******************** tensor_add ********************/
260 
261 // Adds corresponding elements of two tensors
262 
263 // *param[in] srcPtr1 Input tensor1
264 // *param[in] srcPtr2 Input tensor2
265 // *param[out] dstPtr Output tensor
266 // *param[in] tensorDimension Number of dimensions in the tensor
267 // *param[in] tensorDimensionValues Array of length - "tensorDimension", containing size of each dimension in the tensor
268 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
269 // *returns a RppStatus enumeration.
270 // *retval RPP_SUCCESS : No error, Succesful completion
271 // *retval RPP_ERROR : Error
272 
273 RppStatus rppi_tensor_add_u8_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppPtr_t dstPtr, Rpp32u tensorDimension, RppPtr_t tensorDimensionValues, rppHandle_t rppHandle);
274 #ifdef GPU_SUPPORT
275 RppStatus rppi_tensor_add_u8_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppPtr_t dstPtr, Rpp32u tensorDimension, RppPtr_t tensorDimensionValues, rppHandle_t rppHandle);
276 #endif // GPU_SUPPORT
277 
278 /******************** tensor_subtract ********************/
279 
280 // Subtracts corresponding elements of two tensors
281 
282 // *param[in] srcPtr1 Input tensor1
283 // *param[in] srcPtr2 Input tensor2
284 // *param[out] dstPtr Output tensor
285 // *param[in] tensorDimension Number of dimensions in the tensor
286 // *param[in] tensorDimensionValues Array of length - "tensorDimension", containing size of each dimension in the tensor
287 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
288 // *returns a RppStatus enumeration.
289 // *retval RPP_SUCCESS : No error, Succesful completion
290 // *retval RPP_ERROR : Error
291 
292 RppStatus rppi_tensor_subtract_u8_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppPtr_t dstPtr, Rpp32u tensorDimension, RppPtr_t tensorDimensionValues, rppHandle_t rppHandle);
293 #ifdef GPU_SUPPORT
294 RppStatus rppi_tensor_subtract_u8_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppPtr_t dstPtr, Rpp32u tensorDimension, RppPtr_t tensorDimensionValues, rppHandle_t rppHandle);
295 #endif // GPU_SUPPORT
296 
297 /******************** tensor_multiply ********************/
298 
299 // Multiplies corresponding elements of two tensors
300 
301 // *param[in] srcPtr1 Input tensor1
302 // *param[in] srcPtr2 Input tensor2
303 // *param[out] dstPtr Output tensor
304 // *param[in] tensorDimension Number of dimensions in the tensor
305 // *param[in] tensorDimensionValues Array of length - "tensorDimension", containing size of each dimension in the tensor
306 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
307 // *returns a RppStatus enumeration.
308 // *retval RPP_SUCCESS : No error, Succesful completion
309 // *retval RPP_ERROR : Error
310 
311 RppStatus rppi_tensor_multiply_u8_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppPtr_t dstPtr, Rpp32u tensorDimension, RppPtr_t tensorDimensionValues, rppHandle_t rppHandle);
312 #ifdef GPU_SUPPORT
313 RppStatus rppi_tensor_multiply_u8_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppPtr_t dstPtr, Rpp32u tensorDimension, RppPtr_t tensorDimensionValues, rppHandle_t rppHandle);
314 #endif // GPU_SUPPORT
315 
319 #ifdef __cplusplus
320 }
321 #endif
322 
323 #endif
unsigned int Rpp32u
32 bit unsigned int
Definition: rppdefs.h:80
void * RppPtr_t
void pointer
Definition: rppdefs.h:92
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:100
float Rpp32f
32 bit float
Definition: rppdefs.h:88
RPP top-level header with RPP handle API.
RPP common HOST/GPU typedef, enum and structure definitions.
RPPI Image size(Width/Height dimensions) type struct.
Definition: rppdefs.h:317