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
3fb9c522
Commit
3fb9c522
authored
Jul 31, 2013
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cast to reference
parent
bbd519be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
22 deletions
+8
-22
minmax.cu
modules/cudaarithm/src/cuda/minmax.cu
+2
-7
sum.cu
modules/cudaarithm/src/cuda/sum.cu
+6
-15
No files found.
modules/cudaarithm/src/cuda/minmax.cu
View file @
3fb9c522
...
...
@@ -64,8 +64,8 @@ namespace
typename SelectIf<TypesEquals<T, float>::value, float, int>::type
>::type work_type;
GpuMat_<T> src(_src)
;
GpuMat_<work_type>
buf(_buf)
;
const GpuMat_<T>& src = (const GpuMat_<T>&) _src
;
GpuMat_<work_type>
& buf = (GpuMat_<work_type>&) _buf
;
if (mask.empty())
gridFindMinMaxVal(src, buf);
...
...
@@ -103,11 +103,6 @@ void cv::cuda::minMax(InputArray _src, double* minVal, double* maxVal, InputArra
CV_Assert( src.channels() == 1 );
CV_DbgAssert( mask.empty() || (mask.size() == src.size() && mask.type() == CV_8U) );
const int depth = src.depth();
const int work_type = depth == CV_64F ? CV_64F : depth == CV_32F ? CV_32F : CV_32S;
ensureSizeIsEnough(1, 2, work_type, buf);
const func_t func = funcs[src.depth()];
func(src, mask, buf, minVal, maxVal);
...
...
modules/cudaarithm/src/cuda/sum.cu
View file @
3fb9c522
...
...
@@ -61,8 +61,8 @@ namespace
typedef typename MakeVec<T, cn>::type src_type;
typedef typename MakeVec<R, cn>::type res_type;
GpuMat_<src_type> src(_src)
;
GpuMat_<res_type>
buf(_buf)
;
const GpuMat_<src_type>& src = (const GpuMat_<src_type>&) _src
;
GpuMat_<res_type>
& buf = (GpuMat_<res_type>&) _buf
;
if (mask.empty())
gridCalcSum(src, buf);
...
...
@@ -82,8 +82,8 @@ namespace
typedef typename MakeVec<T, cn>::type src_type;
typedef typename MakeVec<R, cn>::type res_type;
GpuMat_<src_type> src(_src)
;
GpuMat_<res_type>
buf(_buf)
;
const GpuMat_<src_type>& src = (const GpuMat_<src_type>&) _src
;
GpuMat_<res_type>
& buf = (GpuMat_<res_type>&) _buf
;
if (mask.empty())
gridCalcSum(abs_(cvt_<res_type>(src)), buf);
...
...
@@ -103,8 +103,8 @@ namespace
typedef typename MakeVec<T, cn>::type src_type;
typedef typename MakeVec<R, cn>::type res_type;
GpuMat_<src_type> src(_src)
;
GpuMat_<res_type>
buf(_buf)
;
const GpuMat_<src_type>& src = (const GpuMat_<src_type>&) _src
;
GpuMat_<res_type>
& buf = (GpuMat_<res_type>&) _buf
;
if (mask.empty())
gridCalcSum(sqr_(cvt_<res_type>(src)), buf);
...
...
@@ -138,9 +138,6 @@ cv::Scalar cv::cuda::sum(InputArray _src, InputArray _mask, GpuMat& buf)
CV_DbgAssert( mask.empty() || (mask.type() == CV_8UC1 && mask.size() == src.size()) );
const int res_depth = std::max(src.depth(), CV_32F);
cv::cuda::ensureSizeIsEnough(1, 1, CV_MAKE_TYPE(res_depth, src.channels()), buf);
const func_t func = funcs[src.depth()][src.channels() - 1];
return func(src, mask, buf);
...
...
@@ -165,9 +162,6 @@ cv::Scalar cv::cuda::absSum(InputArray _src, InputArray _mask, GpuMat& buf)
CV_DbgAssert( mask.empty() || (mask.type() == CV_8UC1 && mask.size() == src.size()) );
const int res_depth = std::max(src.depth(), CV_32F);
cv::cuda::ensureSizeIsEnough(1, 1, CV_MAKE_TYPE(res_depth, src.channels()), buf);
const func_t func = funcs[src.depth()][src.channels() - 1];
return func(src, mask, buf);
...
...
@@ -192,9 +186,6 @@ cv::Scalar cv::cuda::sqrSum(InputArray _src, InputArray _mask, GpuMat& buf)
CV_DbgAssert( mask.empty() || (mask.type() == CV_8UC1 && mask.size() == src.size()) );
const int res_depth = CV_64F;
cv::cuda::ensureSizeIsEnough(1, 1, CV_MAKE_TYPE(res_depth, src.channels()), buf);
const func_t func = funcs[src.depth()][src.channels() - 1];
return func(src, mask, buf);
...
...
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