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
c17bd8c1
Commit
c17bd8c1
authored
Jun 15, 2012
by
Marina Kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed "shadow" warnings in nvidia folder
parent
f33d9022
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
50 deletions
+50
-50
NCVBroxOpticalFlow.cu
modules/gpu/src/nvidia/NCVBroxOpticalFlow.cu
+0
-0
NCVHaarObjectDetection.cu
modules/gpu/src/nvidia/NCVHaarObjectDetection.cu
+12
-12
NPP_staging.cu
modules/gpu/src/nvidia/NPP_staging/NPP_staging.cu
+7
-7
NCV.cu
modules/gpu/src/nvidia/core/NCV.cu
+4
-4
NCV.hpp
modules/gpu/src/nvidia/core/NCV.hpp
+27
-27
No files found.
modules/gpu/src/nvidia/NCVBroxOpticalFlow.cu
View file @
c17bd8c1
This diff is collapsed.
Click to expand it.
modules/gpu/src/nvidia/NCVHaarObjectDetection.cu
View file @
c17bd8c1
...
...
@@ -1622,16 +1622,16 @@ NCVStatus ncvDetectObjectsMultiScale_device(NCVMatrix<Ncv8u> &d_srcImg,
continue;
}
NcvSize32s srcRoi
, srcIIRo
i, scaledIIRoi, searchRoi;
NcvSize32s srcRoi
_, srcIIRo_
i, scaledIIRoi, searchRoi;
srcRoi.width = d_srcImg.width();
srcRoi.height = d_srcImg.height();
srcRoi
_
.width = d_srcImg.width();
srcRoi
_
.height = d_srcImg.height();
srcIIRo
i.width = srcRoi
.width + 1;
srcIIRo
i.height = srcRoi
.height + 1;
srcIIRo
_i.width = srcRoi_
.width + 1;
srcIIRo
_i.height = srcRoi_
.height + 1;
scaledIIRoi.width = srcIIRoi.width / scale;
scaledIIRoi.height = srcIIRoi.height / scale;
scaledIIRoi.width = srcIIRo
_
i.width / scale;
scaledIIRoi.height = srcIIRo
_
i.height / scale;
searchRoi.width = scaledIIRoi.width - haar.ClassifierSize.width;
searchRoi.height = scaledIIRoi.height - haar.ClassifierSize.height;
...
...
@@ -1659,12 +1659,12 @@ NCVStatus ncvDetectObjectsMultiScale_device(NCVMatrix<Ncv8u> &d_srcImg,
{
Ncv32u scale = scalesVector[i];
NcvSize32u srcRoi, scaledIIRoi, searchRoi;
NcvSize32u srcRoi
_
, scaledIIRoi, searchRoi;
NcvSize32u srcIIRoi;
srcRoi.width = d_srcImg.width();
srcRoi.height = d_srcImg.height();
srcIIRoi.width = srcRoi.width + 1;
srcIIRoi.height = srcRoi.height + 1;
srcRoi
_
.width = d_srcImg.width();
srcRoi
_
.height = d_srcImg.height();
srcIIRoi.width = srcRoi
_
.width + 1;
srcIIRoi.height = srcRoi
_
.height + 1;
scaledIIRoi.width = srcIIRoi.width / scale;
scaledIIRoi.height = srcIIRoi.height / scale;
searchRoi.width = scaledIIRoi.width - haar.ClassifierSize.width;
...
...
modules/gpu/src/nvidia/NPP_staging/NPP_staging.cu
View file @
c17bd8c1
...
...
@@ -1414,17 +1414,17 @@ NCVStatus compactVector_32u_device(Ncv32u *d_src, Ncv32u srcLen,
//calculate hierarchical partial sums
for (Ncv32u i=1; i<partSumNums.size()-1; i++)
{
dim3 grid(partSumNums[i+1]);
if (grid.x > 65535)
dim3 grid
_partial
(partSumNums[i+1]);
if (grid
_partial
.x > 65535)
{
grid
.y = (grid
.x + 65534) / 65535;
grid.x = 65535;
grid
_partial.y = (grid_partial
.x + 65534) / 65535;
grid
_partial
.x = 65535;
}
if (grid.x != 1)
if (grid
_partial
.x != 1)
{
removePass1Scan
<false, true>
<<<grid, block, 0, nppStGetActiveCUDAstream()>>>
<<<grid
_partial
, block, 0, nppStGetActiveCUDAstream()>>>
(d_hierSums.ptr() + partSumOffsets[i],
partSumNums[i], NULL,
d_hierSums.ptr() + partSumOffsets[i+1],
...
...
@@ -1434,7 +1434,7 @@ NCVStatus compactVector_32u_device(Ncv32u *d_src, Ncv32u srcLen,
{
removePass1Scan
<false, false>
<<<grid, block, 0, nppStGetActiveCUDAstream()>>>
<<<grid
_partial
, block, 0, nppStGetActiveCUDAstream()>>>
(d_hierSums.ptr() + partSumOffsets[i],
partSumNums[i], NULL,
NULL,
...
...
modules/gpu/src/nvidia/core/NCV.cu
View file @
c17bd8c1
...
...
@@ -723,16 +723,16 @@ static NCVStatus drawRectsWrapperHost(T *h_dst,
if (rect.x < dstWidth)
{
for (Ncv32u
i=rect.y; i<rect.y+rect.height && i<dstHeight; i
++)
for (Ncv32u
each=rect.y; each<rect.y+rect.height && each<dstHeight; each
++)
{
h_dst[
i
*dstStride+rect.x] = color;
h_dst[
each
*dstStride+rect.x] = color;
}
}
if (rect.x+rect.width-1 < dstWidth)
{
for (Ncv32u
i=rect.y; i<rect.y+rect.height && i<dstHeight; i
++)
for (Ncv32u
each=rect.y; each<rect.y+rect.height && each<dstHeight; each
++)
{
h_dst[
i
*dstStride+rect.x+rect.width-1] = color;
h_dst[
each
*dstStride+rect.x+rect.width-1] = color;
}
}
if (rect.y < dstHeight)
...
...
modules/gpu/src/nvidia/core/NCV.hpp
View file @
c17bd8c1
...
...
@@ -623,11 +623,11 @@ class NCVVectorAlloc : public NCVVector<T>
{
NCVVectorAlloc
();
NCVVectorAlloc
(
const
NCVVectorAlloc
&
);
NCVVectorAlloc
&
operator
=
(
const
NCVVectorAlloc
<
T
>&
);
NCVVectorAlloc
&
operator
=
(
const
NCVVectorAlloc
<
T
>&
);
public
:
NCVVectorAlloc
(
INCVMemAllocator
&
allocator_
,
Ncv32u
length
)
NCVVectorAlloc
(
INCVMemAllocator
&
allocator_
,
Ncv32u
length
_
)
:
allocator
(
allocator_
)
{
...
...
@@ -636,11 +636,11 @@ public:
this
->
clear
();
this
->
allocatedMem
.
clear
();
ncvStat
=
allocator
.
alloc
(
this
->
allocatedMem
,
length
*
sizeof
(
T
));
ncvStat
=
allocator
.
alloc
(
this
->
allocatedMem
,
length
_
*
sizeof
(
T
));
ncvAssertPrintReturn
(
ncvStat
==
NCV_SUCCESS
,
"NCVVectorAlloc ctor:: alloc failed"
,
);
this
->
_ptr
=
(
T
*
)
this
->
allocatedMem
.
begin
.
ptr
;
this
->
_length
=
length
;
this
->
_length
=
length
_
;
this
->
_memtype
=
this
->
allocatedMem
.
begin
.
memtype
;
}
...
...
@@ -698,15 +698,15 @@ public:
this
->
bReused
=
true
;
}
NCVVectorReuse
(
const
NCVMemSegment
&
memSegment
,
Ncv32u
length
)
NCVVectorReuse
(
const
NCVMemSegment
&
memSegment
,
Ncv32u
length
_
)
{
this
->
bReused
=
false
;
this
->
clear
();
ncvAssertPrintReturn
(
length
*
sizeof
(
T
)
<=
memSegment
.
size
,
\
ncvAssertPrintReturn
(
length
_
*
sizeof
(
T
)
<=
memSegment
.
size
,
\
"NCVVectorReuse ctor:: memory binding failed due to size mismatch"
,
);
this
->
_length
=
length
;
this
->
_length
=
length
_
;
this
->
_ptr
=
(
T
*
)
memSegment
.
begin
.
ptr
;
this
->
_memtype
=
memSegment
.
begin
.
memtype
;
...
...
@@ -841,34 +841,34 @@ class NCVMatrixAlloc : public NCVMatrix<T>
NCVMatrixAlloc
&
operator
=
(
const
NCVMatrixAlloc
&
);
public
:
NCVMatrixAlloc
(
INCVMemAllocator
&
allocator
,
Ncv32u
width
,
Ncv32u
height
,
Ncv32u
_pitch
=
0
)
NCVMatrixAlloc
(
INCVMemAllocator
&
allocator
_
,
Ncv32u
width_
,
Ncv32u
height_
,
Ncv32u
pitch_
=
0
)
:
allocator
(
allocator
)
allocator
(
allocator
_
)
{
NCVStatus
ncvStat
;
this
->
clear
();
this
->
allocatedMem
.
clear
();
Ncv32u
widthBytes
=
width
*
sizeof
(
T
);
Ncv32u
widthBytes
=
width
_
*
sizeof
(
T
);
Ncv32u
pitchBytes
=
alignUp
(
widthBytes
,
allocator
.
alignment
());
if
(
_pitch
!=
0
)
if
(
pitch_
!=
0
)
{
ncvAssertPrintReturn
(
_pitch
>=
pitchBytes
&&
(
_pitch
&
(
allocator
.
alignment
()
-
1
))
==
0
,
ncvAssertPrintReturn
(
pitch_
>=
pitchBytes
&&
(
pitch_
&
(
allocator
.
alignment
()
-
1
))
==
0
,
"NCVMatrixAlloc ctor:: incorrect pitch passed"
,
);
pitchBytes
=
_pitch
;
pitchBytes
=
pitch_
;
}
Ncv32u
requiredAllocSize
=
pitchBytes
*
height
;
Ncv32u
requiredAllocSize
=
pitchBytes
*
height
_
;
ncvStat
=
allocator
.
alloc
(
this
->
allocatedMem
,
requiredAllocSize
);
ncvAssertPrintReturn
(
ncvStat
==
NCV_SUCCESS
,
"NCVMatrixAlloc ctor:: alloc failed"
,
);
this
->
_ptr
=
(
T
*
)
this
->
allocatedMem
.
begin
.
ptr
;
this
->
_width
=
width
;
this
->
_height
=
height
;
this
->
_width
=
width
_
;
this
->
_height
=
height
_
;
this
->
_pitch
=
pitchBytes
;
this
->
_memtype
=
this
->
allocatedMem
.
begin
.
memtype
;
}
...
...
@@ -916,34 +916,34 @@ class NCVMatrixReuse : public NCVMatrix<T>
public
:
NCVMatrixReuse
(
const
NCVMemSegment
&
memSegment
,
Ncv32u
alignment
,
Ncv32u
width
,
Ncv32u
height
,
Ncv32u
pitch
=
0
,
NcvBool
bSkipPitchCheck
=
false
)
NCVMatrixReuse
(
const
NCVMemSegment
&
memSegment
,
Ncv32u
alignment
,
Ncv32u
width
_
,
Ncv32u
height_
,
Ncv32u
pitch_
=
0
,
NcvBool
bSkipPitchCheck
=
false
)
{
this
->
bReused
=
false
;
this
->
clear
();
Ncv32u
widthBytes
=
width
*
sizeof
(
T
);
Ncv32u
widthBytes
=
width
_
*
sizeof
(
T
);
Ncv32u
pitchBytes
=
alignUp
(
widthBytes
,
alignment
);
if
(
pitch
!=
0
)
if
(
pitch
_
!=
0
)
{
if
(
!
bSkipPitchCheck
)
{
ncvAssertPrintReturn
(
pitch
>=
pitchBytes
&&
(
pitch
&
(
alignment
-
1
))
==
0
,
ncvAssertPrintReturn
(
pitch
_
>=
pitchBytes
&&
(
pitch
_
&
(
alignment
-
1
))
==
0
,
"NCVMatrixReuse ctor:: incorrect pitch passed"
,
);
}
else
{
ncvAssertPrintReturn
(
pitch
>=
widthBytes
,
"NCVMatrixReuse ctor:: incorrect pitch passed"
,
);
ncvAssertPrintReturn
(
pitch
_
>=
widthBytes
,
"NCVMatrixReuse ctor:: incorrect pitch passed"
,
);
}
pitchBytes
=
pitch
;
pitchBytes
=
pitch
_
;
}
ncvAssertPrintReturn
(
pitchBytes
*
height
<=
memSegment
.
size
,
\
ncvAssertPrintReturn
(
pitchBytes
*
height
_
<=
memSegment
.
size
,
\
"NCVMatrixReuse ctor:: memory binding failed due to size mismatch"
,
);
this
->
_width
=
width
;
this
->
_height
=
height
;
this
->
_width
=
width
_
;
this
->
_height
=
height
_
;
this
->
_pitch
=
pitchBytes
;
this
->
_ptr
=
(
T
*
)
memSegment
.
begin
.
ptr
;
this
->
_memtype
=
memSegment
.
begin
.
memtype
;
...
...
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