Skip to content

Commit 700a172

Browse files
committed
cudafilters: Add comment for use with CUDA streams
1 parent cb495d9 commit 700a172

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

modules/cudafilters/include/opencv2/cudafilters.hpp

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ center.
9797
@param borderMode Pixel extrapolation method. For details, see borderInterpolate .
9898
@param borderVal Default border value.
9999
100+
@note
101+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
102+
100103
@sa boxFilter
101104
*/
102105
CV_EXPORTS_W Ptr<Filter> createBoxFilter(int srcType, int dstType, Size ksize, Point anchor = Point(-1, -1),
@@ -115,6 +118,9 @@ center.
115118
@param borderMode Pixel extrapolation method. For details, see borderInterpolate .
116119
@param borderVal Default border value.
117120
121+
@note
122+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
123+
118124
@sa filter2D
119125
*/
120126
CV_EXPORTS_W Ptr<Filter> createLinearFilter(int srcType, int dstType, InputArray kernel, Point anchor = Point(-1, -1),
@@ -134,6 +140,9 @@ applied (see getDerivKernels ).
134140
@param borderMode Pixel extrapolation method. For details, see borderInterpolate .
135141
@param borderVal Default border value.
136142
143+
@note
144+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
145+
137146
@sa Laplacian
138147
*/
139148
CV_EXPORTS_W Ptr<Filter> createLaplacianFilter(int srcType, int dstType, int ksize = 1, double scale = 1,
@@ -156,6 +165,9 @@ the aperture center.
156165
borderInterpolate.
157166
@param columnBorderMode Pixel extrapolation method in the horizontal direction.
158167
168+
@note
169+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
170+
159171
@sa sepFilter2D
160172
*/
161173
CV_EXPORTS_W Ptr<Filter> createSeparableLinearFilter(int srcType, int dstType, InputArray rowKernel, InputArray columnKernel,
@@ -178,6 +190,9 @@ applied. For details, see getDerivKernels .
178190
@param rowBorderMode Pixel extrapolation method in the vertical direction. For details, see
179191
borderInterpolate.
180192
@param columnBorderMode Pixel extrapolation method in the horizontal direction.
193+
194+
@note
195+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
181196
*/
182197
CV_EXPORTS_W Ptr<Filter> createDerivFilter(int srcType, int dstType, int dx, int dy,
183198
int ksize, bool normalize = false, double scale = 1,
@@ -196,6 +211,9 @@ applied. For details, see getDerivKernels .
196211
borderInterpolate.
197212
@param columnBorderMode Pixel extrapolation method in the horizontal direction.
198213
214+
@note
215+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
216+
199217
@sa Sobel
200218
*/
201219
CV_EXPORTS_W Ptr<Filter> createSobelFilter(int srcType, int dstType, int dx, int dy, int ksize = 3,
@@ -213,6 +231,9 @@ applied. See getDerivKernels for details.
213231
borderInterpolate.
214232
@param columnBorderMode Pixel extrapolation method in the horizontal direction.
215233
234+
@note
235+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
236+
216237
@sa Scharr
217238
*/
218239
CV_EXPORTS_W Ptr<Filter> createScharrFilter(int srcType, int dstType, int dx, int dy,
@@ -233,6 +254,9 @@ CV_EXPORTS_W Ptr<Filter> createScharrFilter(int srcType, int dstType, int dx, in
233254
borderInterpolate.
234255
@param columnBorderMode Pixel extrapolation method in the horizontal direction.
235256
257+
@note
258+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
259+
236260
@sa GaussianBlur
237261
*/
238262
CV_EXPORTS_W Ptr<Filter> createGaussianFilter(int srcType, int dstType, Size ksize,
@@ -258,6 +282,9 @@ CV_EXPORTS_W Ptr<Filter> createGaussianFilter(int srcType, int dstType, Size ksi
258282
is at the center.
259283
@param iterations Number of times erosion and dilation to be applied.
260284
285+
@note
286+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
287+
261288
@sa morphologyEx
262289
*/
263290
CV_EXPORTS_W Ptr<Filter> createMorphologyFilter(int op, int srcType, InputArray kernel, Point anchor = Point(-1, -1), int iterations = 1);
@@ -272,6 +299,9 @@ CV_EXPORTS_W Ptr<Filter> createMorphologyFilter(int op, int srcType, InputArray
272299
@param anchor Anchor point. The default value (-1) means that the anchor is at the kernel center.
273300
@param borderMode Pixel extrapolation method. For details, see borderInterpolate .
274301
@param borderVal Default border value.
302+
303+
@note
304+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
275305
*/
276306
CV_EXPORTS_W Ptr<Filter> createBoxMaxFilter(int srcType, Size ksize,
277307
Point anchor = Point(-1, -1),
@@ -284,6 +314,9 @@ CV_EXPORTS_W Ptr<Filter> createBoxMaxFilter(int srcType, Size ksize,
284314
@param anchor Anchor point. The default value (-1) means that the anchor is at the kernel center.
285315
@param borderMode Pixel extrapolation method. For details, see borderInterpolate .
286316
@param borderVal Default border value.
317+
318+
@note
319+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
287320
*/
288321
CV_EXPORTS_W Ptr<Filter> createBoxMinFilter(int srcType, Size ksize,
289322
Point anchor = Point(-1, -1),
@@ -300,6 +333,9 @@ CV_EXPORTS_W Ptr<Filter> createBoxMinFilter(int srcType, Size ksize,
300333
@param anchor Anchor point. The default value (-1) means that the anchor is at the kernel center.
301334
@param borderMode Pixel extrapolation method. For details, see borderInterpolate .
302335
@param borderVal Default border value.
336+
337+
@note
338+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
303339
*/
304340
CV_EXPORTS_W Ptr<Filter> createRowSumFilter(int srcType, int dstType, int ksize, int anchor = -1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0));
305341

@@ -311,6 +347,9 @@ CV_EXPORTS_W Ptr<Filter> createRowSumFilter(int srcType, int dstType, int ksize,
311347
@param anchor Anchor point. The default value (-1) means that the anchor is at the kernel center.
312348
@param borderMode Pixel extrapolation method. For details, see borderInterpolate .
313349
@param borderVal Default border value.
350+
351+
@note
352+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
314353
*/
315354
CV_EXPORTS_W Ptr<Filter> createColumnSumFilter(int srcType, int dstType, int ksize, int anchor = -1, int borderMode = BORDER_DEFAULT, Scalar borderVal = Scalar::all(0));
316355

@@ -329,6 +368,9 @@ Outputs an image that has been filtered using a median-filtering formulation.
329368
Details on this algorithm can be found in:
330369
Green, O., 2017. "Efficient scalable median filtering using histogram-based operations",
331370
IEEE Transactions on Image Processing, 27(5), pp.2217-2228.
371+
372+
@note
373+
If applied in a CUDA Stream, a distinct filter instance must be created for each Stream. Sharing a single instance across multiple streams is unsupported and may lead to undefined behavior due to stream-specific internal state.
332374
*/
333375
CV_EXPORTS_W Ptr<Filter> createMedianFilter(int srcType, int windowSize, int partition = 128);
334376

0 commit comments

Comments
 (0)