Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
21b081de
Commit
21b081de
authored
Dec 24, 2010
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
now single row GPU matrix is continuous one, added aux. functions, updated dft and matchTemplates
parent
54fcdf4c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
102 deletions
+73
-102
gpu.hpp
modules/gpu/include/opencv2/gpu/gpu.hpp
+3
-0
matrix_operations.hpp
modules/gpu/include/opencv2/gpu/matrix_operations.hpp
+20
-0
imgproc_gpu.cpp
modules/gpu/src/imgproc_gpu.cpp
+32
-101
matrix_operations.cpp
modules/gpu/src/matrix_operations.cpp
+14
-0
dft_routines.cpp
tests/gpu/src/dft_routines.cpp
+3
-1
gputest_main.cpp
tests/gpu/src/gputest_main.cpp
+1
-0
No files found.
modules/gpu/include/opencv2/gpu/gpu.hpp
View file @
21b081de
...
@@ -246,6 +246,9 @@ namespace cv
...
@@ -246,6 +246,9 @@ namespace cv
#include "GpuMat_BetaDeprecated.hpp"
#include "GpuMat_BetaDeprecated.hpp"
#endif
#endif
//! creates continuous GPU matrix
CV_EXPORTS
void
createContinuous
(
int
rows
,
int
cols
,
int
type
,
GpuMat
&
m
);
//////////////////////////////// CudaMem ////////////////////////////////
//////////////////////////////// CudaMem ////////////////////////////////
// CudaMem is limited cv::Mat with page locked memory allocation.
// CudaMem is limited cv::Mat with page locked memory allocation.
// Page locked memory is only needed for async and faster coping to GPU.
// Page locked memory is only needed for async and faster coping to GPU.
...
...
modules/gpu/include/opencv2/gpu/matrix_operations.hpp
View file @
21b081de
...
@@ -345,6 +345,26 @@ inline GpuMat GpuMat::t() const
...
@@ -345,6 +345,26 @@ inline GpuMat GpuMat::t() const
static
inline
void
swap
(
GpuMat
&
a
,
GpuMat
&
b
)
{
a
.
swap
(
b
);
}
static
inline
void
swap
(
GpuMat
&
a
,
GpuMat
&
b
)
{
a
.
swap
(
b
);
}
inline
GpuMat
createContinuous
(
int
rows
,
int
cols
,
int
type
)
{
GpuMat
m
;
createContinuous
(
rows
,
cols
,
type
,
m
);
return
m
;
}
inline
void
createContinuous
(
Size
size
,
int
type
,
GpuMat
&
m
)
{
createContinuous
(
size
.
height
,
size
.
width
,
type
,
m
);
}
inline
GpuMat
createContinuous
(
Size
size
,
int
type
)
{
GpuMat
m
;
createContinuous
(
size
,
type
,
m
);
return
m
;
}
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
//////////////////////////////// CudaMem ////////////////////////////////
//////////////////////////////// CudaMem ////////////////////////////////
...
...
modules/gpu/src/imgproc_gpu.cpp
View file @
21b081de
...
@@ -1147,38 +1147,27 @@ void cv::gpu::dft(const GpuMat& src, GpuMat& dst, int flags, int nonZeroRows, bo
...
@@ -1147,38 +1147,27 @@ void cv::gpu::dft(const GpuMat& src, GpuMat& dst, int flags, int nonZeroRows, bo
// We don't support real-to-real transform
// We don't support real-to-real transform
CV_Assert
(
is_complex_input
||
is_complex_output
);
CV_Assert
(
is_complex_input
||
is_complex_output
);
GpuMat
src_data
,
src_aux
;
GpuMat
src_data
;
// Make sure here we work with the continuous input,
// Make sure here we work with the continuous input,
// as CUFFT can't handle gaps
// as CUFFT can't handle gaps
if
(
src
.
isContinuous
())
src_data
=
src
;
src_data
=
src_aux
=
src
;
createContinuous
(
src
.
rows
,
src
.
cols
,
src
.
type
(),
src_data
);
else
if
(
src_data
.
data
!=
src
.
data
)
{
src
.
copyTo
(
src_data
);
src_data
=
GpuMat
(
1
,
src
.
size
().
area
(),
src
.
type
());
src_aux
=
GpuMat
(
src
.
rows
,
src
.
cols
,
src
.
type
(),
src_data
.
ptr
(),
src
.
cols
*
src
.
elemSize
());
src
.
copyTo
(
src_aux
);
if
(
is_1d_input
&&
!
is_row_dft
)
if
(
is_1d_input
&&
!
is_row_dft
)
{
// If the source matrix is single column reshape it into single row
// If the source matrix is the single column
src_data
=
src_data
.
reshape
(
0
,
std
::
min
(
src
.
rows
,
src
.
cols
));
// reshape it into single row
int
rows
=
std
::
min
(
src
.
rows
,
src
.
cols
);
int
cols
=
src
.
size
().
area
()
/
rows
;
src_aux
=
GpuMat
(
rows
,
cols
,
src
.
type
(),
src_data
.
ptr
(),
cols
*
src
.
elemSize
());
}
}
cufftType
dft_type
=
CUFFT_R2C
;
cufftType
dft_type
=
CUFFT_R2C
;
if
(
is_complex_input
)
if
(
is_complex_input
)
dft_type
=
is_complex_output
?
CUFFT_C2C
:
CUFFT_C2R
;
dft_type
=
is_complex_output
?
CUFFT_C2C
:
CUFFT_C2R
;
int
dft_rows
=
src_
aux
.
rows
;
int
dft_rows
=
src_
data
.
rows
;
int
dft_cols
=
src_
aux
.
cols
;
int
dft_cols
=
src_
data
.
cols
;
if
(
is_complex_input
&&
!
is_complex_output
)
if
(
is_complex_input
&&
!
is_complex_output
)
dft_cols
=
(
src_
aux
.
cols
-
1
)
*
2
+
(
int
)
odd
;
dft_cols
=
(
src_
data
.
cols
-
1
)
*
2
+
(
int
)
odd
;
CV_Assert
(
dft_cols
>
1
);
CV_Assert
(
dft_cols
>
1
);
cufftHandle
plan
;
cufftHandle
plan
;
...
@@ -1187,99 +1176,45 @@ void cv::gpu::dft(const GpuMat& src, GpuMat& dst, int flags, int nonZeroRows, bo
...
@@ -1187,99 +1176,45 @@ void cv::gpu::dft(const GpuMat& src, GpuMat& dst, int flags, int nonZeroRows, bo
else
else
cufftPlan2d
(
&
plan
,
dft_rows
,
dft_cols
,
dft_type
);
cufftPlan2d
(
&
plan
,
dft_rows
,
dft_cols
,
dft_type
);
GpuMat
dst_data
,
dst_aux
;
int
dst_cols
,
dst_rows
;
int
dst_cols
,
dst_rows
;
bool
is_dst_mem_good
;
if
(
is_complex_input
)
if
(
is_complex_input
)
{
{
if
(
is_complex_output
)
if
(
is_complex_output
)
{
{
is_dst_mem_good
=
dst
.
isContinuous
()
&&
dst
.
type
()
==
CV_32FC2
createContinuous
(
src
.
rows
,
src
.
cols
,
CV_32FC2
,
dst
);
&&
dst
.
cols
>=
src
.
cols
&&
dst
.
rows
>=
src
.
rows
;
if
(
is_dst_mem_good
)
dst_data
=
dst
;
else
{
dst_data
.
create
(
1
,
src
.
size
().
area
(),
CV_32FC2
);
dst_aux
=
GpuMat
(
src
.
rows
,
src
.
cols
,
dst_data
.
type
(),
dst_data
.
ptr
(),
src
.
cols
*
dst_data
.
elemSize
());
}
cufftSafeCall
(
cufftExecC2C
(
cufftSafeCall
(
cufftExecC2C
(
plan
,
src_data
.
ptr
<
cufftComplex
>
(),
plan
,
src_data
.
ptr
<
cufftComplex
>
(),
dst
.
ptr
<
cufftComplex
>
(),
dst_data
.
ptr
<
cufftComplex
>
(),
is_inverse
?
CUFFT_INVERSE
:
CUFFT_FORWARD
));
is_inverse
?
CUFFT_INVERSE
:
CUFFT_FORWARD
));
if
(
!
is_dst_mem_good
)
{
dst
.
create
(
dst_aux
.
size
(),
dst_aux
.
type
());
dst_aux
.
copyTo
(
dst
);
}
}
}
else
else
{
{
dst_rows
=
src
.
rows
;
dst_rows
=
src
.
rows
;
dst_cols
=
(
src
.
cols
-
1
)
*
2
+
(
int
)
odd
;
dst_cols
=
(
src
.
cols
-
1
)
*
2
+
(
int
)
odd
;
if
(
src_
aux
.
size
()
!=
src
.
size
())
if
(
src_
data
.
size
()
!=
src
.
size
())
{
{
dst_rows
=
(
src
.
rows
-
1
)
*
2
+
(
int
)
odd
;
dst_rows
=
(
src
.
rows
-
1
)
*
2
+
(
int
)
odd
;
dst_cols
=
src
.
cols
;
dst_cols
=
src
.
cols
;
}
}
is_dst_mem_good
=
dst
.
isContinuous
()
&&
dst
.
type
()
==
CV_32F
createContinuous
(
dst_rows
,
dst_cols
,
CV_32F
,
dst
);
&&
dst
.
cols
>=
dst_cols
&&
dst
.
rows
>=
dst_rows
;
if
(
is_dst_mem_good
)
dst_data
=
dst
;
else
{
dst_data
.
create
(
1
,
dst_rows
*
dst_cols
,
CV_32F
);
dst_aux
=
GpuMat
(
dst_rows
,
dst_cols
,
dst_data
.
type
(),
dst_data
.
ptr
(),
dst_cols
*
dst_data
.
elemSize
());
}
cufftSafeCall
(
cufftExecC2R
(
cufftSafeCall
(
cufftExecC2R
(
plan
,
src_data
.
ptr
<
cufftComplex
>
(),
dst_data
.
ptr
<
cufftReal
>
()));
plan
,
src_data
.
ptr
<
cufftComplex
>
(),
dst
.
ptr
<
cufftReal
>
()));
if
(
!
is_dst_mem_good
)
{
dst
.
create
(
dst_aux
.
size
(),
dst_aux
.
type
());
dst_aux
.
copyTo
(
dst
);
}
}
}
}
}
else
else
{
{
dst_rows
=
src
.
rows
;
dst_rows
=
src
.
rows
;
dst_cols
=
src
.
cols
/
2
+
1
;
dst_cols
=
src
.
cols
/
2
+
1
;
if
(
src_
aux
.
size
()
!=
src
.
size
())
if
(
src_
data
.
size
()
!=
src
.
size
())
{
{
dst_rows
=
src
.
rows
/
2
+
1
;
dst_rows
=
src
.
rows
/
2
+
1
;
dst_cols
=
src
.
cols
;
dst_cols
=
src
.
cols
;
}
}
is_dst_mem_good
=
dst
.
isContinuous
()
&&
dst
.
type
()
==
CV_32FC2
createContinuous
(
dst_rows
,
dst_cols
,
CV_32FC2
,
dst
);
&&
dst
.
cols
>=
dst_cols
&&
dst
.
rows
>=
dst_rows
;
if
(
is_dst_mem_good
)
dst_data
=
dst
;
else
{
dst_data
.
create
(
1
,
dst_rows
*
dst_cols
,
CV_32FC2
);
dst_aux
=
GpuMat
(
dst_rows
,
dst_cols
,
dst_data
.
type
(),
dst_data
.
ptr
(),
dst_cols
*
dst_data
.
elemSize
());
}
cufftSafeCall
(
cufftExecR2C
(
cufftSafeCall
(
cufftExecR2C
(
plan
,
src_data
.
ptr
<
cufftReal
>
(),
dst_data
.
ptr
<
cufftComplex
>
()));
plan
,
src_data
.
ptr
<
cufftReal
>
(),
dst
.
ptr
<
cufftComplex
>
()));
if
(
!
is_dst_mem_good
)
{
dst
.
create
(
dst_aux
.
size
(),
dst_aux
.
type
());
dst_aux
.
copyTo
(
dst
);
}
}
}
cufftSafeCall
(
cufftDestroy
(
plan
));
cufftSafeCall
(
cufftDestroy
(
plan
));
...
@@ -1340,28 +1275,26 @@ void cv::gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result,
...
@@ -1340,28 +1275,26 @@ void cv::gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result,
block_size
.
width
=
std
::
min
(
dft_size
.
width
-
templ
.
cols
+
1
,
result
.
cols
);
block_size
.
width
=
std
::
min
(
dft_size
.
width
-
templ
.
cols
+
1
,
result
.
cols
);
block_size
.
height
=
std
::
min
(
dft_size
.
height
-
templ
.
rows
+
1
,
result
.
rows
);
block_size
.
height
=
std
::
min
(
dft_size
.
height
-
templ
.
rows
+
1
,
result
.
rows
);
GpuMat
image_data
(
1
,
dft_size
.
area
(),
CV_32F
);
GpuMat
result_data
=
createContinuous
(
dft_size
,
CV_32F
);
GpuMat
templ_data
(
1
,
dft_size
.
area
(),
CV_32F
);
GpuMat
result_data
(
1
,
dft_size
.
area
(),
CV_32F
);
int
spect_len
=
dft_size
.
height
*
(
dft_size
.
width
/
2
+
1
);
int
spect_len
=
dft_size
.
height
*
(
dft_size
.
width
/
2
+
1
);
GpuMat
image_spect
(
1
,
spect_len
,
CV_32FC2
);
GpuMat
image_spect
=
createContinuous
(
1
,
spect_len
,
CV_32FC2
);
GpuMat
templ_spect
(
1
,
spect_len
,
CV_32FC2
);
GpuMat
templ_spect
=
createContinuous
(
1
,
spect_len
,
CV_32FC2
);
GpuMat
result_spect
(
1
,
spect_len
,
CV_32FC2
);
GpuMat
result_spect
=
createContinuous
(
1
,
spect_len
,
CV_32FC2
);
cufftHandle
planR2C
,
planC2R
;
cufftHandle
planR2C
,
planC2R
;
cufftSafeCall
(
cufftPlan2d
(
&
planC2R
,
dft_size
.
height
,
dft_size
.
width
,
CUFFT_C2R
));
cufftSafeCall
(
cufftPlan2d
(
&
planC2R
,
dft_size
.
height
,
dft_size
.
width
,
CUFFT_C2R
));
cufftSafeCall
(
cufftPlan2d
(
&
planR2C
,
dft_size
.
height
,
dft_size
.
width
,
CUFFT_R2C
));
cufftSafeCall
(
cufftPlan2d
(
&
planR2C
,
dft_size
.
height
,
dft_size
.
width
,
CUFFT_R2C
));
GpuMat
templ_block
=
createContinuous
(
dft_size
,
CV_32F
);
GpuMat
templ_roi
(
templ
.
size
(),
CV_32F
,
templ
.
data
,
templ
.
step
);
GpuMat
templ_roi
(
templ
.
size
(),
CV_32F
,
templ
.
data
,
templ
.
step
);
GpuMat
templ_block
(
dft_size
,
CV_32F
,
templ_data
.
ptr
(),
dft_size
.
width
*
sizeof
(
cufftReal
));
copyMakeBorder
(
templ_roi
,
templ_block
,
0
,
templ_block
.
rows
-
templ_roi
.
rows
,
0
,
copyMakeBorder
(
templ_roi
,
templ_block
,
0
,
templ_block
.
rows
-
templ_roi
.
rows
,
0
,
templ_block
.
cols
-
templ_roi
.
cols
,
0
);
templ_block
.
cols
-
templ_roi
.
cols
,
0
);
cufftSafeCall
(
cufftExecR2C
(
planR2C
,
templ_
data
.
ptr
<
cufftReal
>
(),
cufftSafeCall
(
cufftExecR2C
(
planR2C
,
templ_
block
.
ptr
<
cufftReal
>
(),
templ_spect
.
ptr
<
cufftComplex
>
()));
templ_spect
.
ptr
<
cufftComplex
>
()));
GpuMat
image_block
(
dft_size
,
CV_32F
,
image_data
.
ptr
(),
dft_size
.
width
*
sizeof
(
cufftReal
)
);
GpuMat
image_block
=
createContinuous
(
dft_size
,
CV_32F
);
// Process all blocks of the result matrix
// Process all blocks of the result matrix
for
(
int
y
=
0
;
y
<
result
.
rows
;
y
+=
block_size
.
height
)
for
(
int
y
=
0
;
y
<
result
.
rows
;
y
+=
block_size
.
height
)
...
@@ -1375,15 +1308,15 @@ void cv::gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result,
...
@@ -1375,15 +1308,15 @@ void cv::gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result,
// Locate ROI in the source matrix
// Locate ROI in the source matrix
GpuMat
image_roi
(
image_roi_size
,
CV_32F
,
(
void
*
)(
image
.
ptr
<
float
>
(
y
)
+
x
),
image
.
step
);
GpuMat
image_roi
(
image_roi_size
,
CV_32F
,
(
void
*
)(
image
.
ptr
<
float
>
(
y
)
+
x
),
image
.
step
);
// Make source image block
contin
ous
// Make source image block
is continu
ous
copyMakeBorder
(
image_roi
,
image_block
,
0
,
image_block
.
rows
-
image_roi
.
rows
,
0
,
copyMakeBorder
(
image_roi
,
image_block
,
0
,
image_block
.
rows
-
image_roi
.
rows
,
0
,
image_block
.
cols
-
image_roi
.
cols
,
0
);
image_block
.
cols
-
image_roi
.
cols
,
0
);
cufftSafeCall
(
cufftExecR2C
(
planR2C
,
image_
data
.
ptr
<
cufftReal
>
(),
cufftSafeCall
(
cufftExecR2C
(
planR2C
,
image_
block
.
ptr
<
cufftReal
>
(),
image_spect
.
ptr
<
cufftComplex
>
()));
image_spect
.
ptr
<
cufftComplex
>
()));
mulAndScaleSpectrums
(
image_spect
,
templ_spect
,
result_spect
,
0
,
mulAndScaleSpectrums
(
image_spect
,
templ_spect
,
result_spect
,
0
,
1.
f
/
dft_size
.
area
(),
ccorr
);
1.
f
/
dft_size
.
area
(),
ccorr
);
cufftSafeCall
(
cufftExecC2R
(
planC2R
,
result_spect
.
ptr
<
cufftComplex
>
(),
cufftSafeCall
(
cufftExecC2R
(
planC2R
,
result_spect
.
ptr
<
cufftComplex
>
(),
result_data
.
ptr
<
cufftReal
>
()));
result_data
.
ptr
<
cufftReal
>
()));
...
@@ -1392,12 +1325,10 @@ void cv::gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result,
...
@@ -1392,12 +1325,10 @@ void cv::gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result,
result_roi_size
.
width
=
std
::
min
(
x
+
block_size
.
width
,
result
.
cols
)
-
x
;
result_roi_size
.
width
=
std
::
min
(
x
+
block_size
.
width
,
result
.
cols
)
-
x
;
result_roi_size
.
height
=
std
::
min
(
y
+
block_size
.
height
,
result
.
rows
)
-
y
;
result_roi_size
.
height
=
std
::
min
(
y
+
block_size
.
height
,
result
.
rows
)
-
y
;
GpuMat
result_roi
(
result_roi_size
,
CV_32F
,
(
void
*
)(
result
.
ptr
<
float
>
(
y
)
+
x
),
result
.
step
);
GpuMat
result_roi
(
result_roi_size
,
result
.
type
()
,
(
void
*
)(
result
.
ptr
<
float
>
(
y
)
+
x
),
result
.
step
);
GpuMat
result_block
(
result_roi_size
,
CV_32F
,
result_data
.
ptr
(),
dft_size
.
width
*
sizeof
(
cufftReal
)
);
GpuMat
result_block
(
result_roi_size
,
result_data
.
type
(),
result_data
.
ptr
(),
result_data
.
step
);
// Copy result block into appropriate part of the result matrix.
// Copy block into appropriate part of the result matrix
// We can't compute it inplace as the result of the CUFFT transforms
// is always continous, while the result matrix and its blocks can have gaps.
result_block
.
copyTo
(
result_roi
);
result_block
.
copyTo
(
result_roi
);
}
}
}
}
...
...
modules/gpu/src/matrix_operations.cpp
View file @
21b081de
...
@@ -67,6 +67,8 @@ namespace cv
...
@@ -67,6 +67,8 @@ namespace cv
void
GpuMat
::
create
(
int
/*_rows*/
,
int
/*_cols*/
,
int
/*_type*/
)
{
throw_nogpu
();
}
void
GpuMat
::
create
(
int
/*_rows*/
,
int
/*_cols*/
,
int
/*_type*/
)
{
throw_nogpu
();
}
void
GpuMat
::
release
()
{
throw_nogpu
();
}
void
GpuMat
::
release
()
{
throw_nogpu
();
}
void
createContinuous
(
int
/*rows*/
,
int
/*cols*/
,
int
/*type*/
,
GpuMat
&
/*m*/
)
{
throw_nogpu
();
}
void
CudaMem
::
create
(
int
/*_rows*/
,
int
/*_cols*/
,
int
/*_type*/
,
int
/*type_alloc*/
)
{
throw_nogpu
();
}
void
CudaMem
::
create
(
int
/*_rows*/
,
int
/*_cols*/
,
int
/*_type*/
,
int
/*type_alloc*/
)
{
throw_nogpu
();
}
bool
CudaMem
::
canMapHostMemory
()
{
throw_nogpu
();
return
false
;
}
bool
CudaMem
::
canMapHostMemory
()
{
throw_nogpu
();
return
false
;
}
void
CudaMem
::
release
()
{
throw_nogpu
();
}
void
CudaMem
::
release
()
{
throw_nogpu
();
}
...
@@ -511,6 +513,10 @@ void cv::gpu::GpuMat::create(int _rows, int _cols, int _type)
...
@@ -511,6 +513,10 @@ void cv::gpu::GpuMat::create(int _rows, int _cols, int _type)
void
*
dev_ptr
;
void
*
dev_ptr
;
cudaSafeCall
(
cudaMallocPitch
(
&
dev_ptr
,
&
step
,
esz
*
cols
,
rows
)
);
cudaSafeCall
(
cudaMallocPitch
(
&
dev_ptr
,
&
step
,
esz
*
cols
,
rows
)
);
// Single row must be continuous
if
(
rows
==
1
)
step
=
esz
*
cols
;
if
(
esz
*
cols
==
step
)
if
(
esz
*
cols
==
step
)
flags
|=
Mat
::
CONTINUOUS_FLAG
;
flags
|=
Mat
::
CONTINUOUS_FLAG
;
...
@@ -537,6 +543,14 @@ void cv::gpu::GpuMat::release()
...
@@ -537,6 +543,14 @@ void cv::gpu::GpuMat::release()
refcount
=
0
;
refcount
=
0
;
}
}
void
cv
::
gpu
::
createContinuous
(
int
rows
,
int
cols
,
int
type
,
GpuMat
&
m
)
{
int
area
=
rows
*
cols
;
if
(
!
m
.
isContinuous
()
||
m
.
type
()
!=
type
||
m
.
size
().
area
()
!=
area
)
m
.
create
(
1
,
area
,
type
);
m
=
m
.
reshape
(
0
,
rows
);
}
///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
//////////////////////////////// CudaMem //////////////////////////////
//////////////////////////////// CudaMem //////////////////////////////
...
...
tests/gpu/src/dft_routines.cpp
View file @
21b081de
...
@@ -411,6 +411,7 @@ struct CV_GpuDftTest: CvTest
...
@@ -411,6 +411,7 @@ struct CV_GpuDftTest: CvTest
}
}
if
(
ok
)
ok
=
cmp
(
a
,
Mat
(
d_c
),
rows
*
cols
*
1e-5
f
);
if
(
ok
)
ok
=
cmp
(
a
,
Mat
(
d_c
),
rows
*
cols
*
1e-5
f
);
if
(
!
ok
)
if
(
!
ok
)
ts
->
printf
(
CvTS
::
CONSOLE
,
"testR2CThenC2R failed: hint=%s, cols=%d, rows=%d
\n
"
,
hint
.
c_str
(),
cols
,
rows
);
ts
->
printf
(
CvTS
::
CONSOLE
,
"testR2CThenC2R failed: hint=%s, cols=%d, rows=%d, inplace=%d
\n
"
,
hint
.
c_str
(),
cols
,
rows
,
inplace
);
}
}
}
CV_GpuDftTest_inst
;
}
CV_GpuDftTest_inst
;
\ No newline at end of file
tests/gpu/src/gputest_main.cpp
View file @
21b081de
...
@@ -47,6 +47,7 @@ const char* blacklist[] =
...
@@ -47,6 +47,7 @@ const char* blacklist[] =
{
{
"GPU-AsyncGpuMatOperator"
,
// crash
"GPU-AsyncGpuMatOperator"
,
// crash
"GPU-NppImageCanny"
,
// NPP_TEXTURE_BIND_ERROR
"GPU-NppImageCanny"
,
// NPP_TEXTURE_BIND_ERROR
"GPU-BruteForceMatcher"
,
// often crashes when seed=000001af5a11badd
0
0
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment