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
dc69cf3a
Commit
dc69cf3a
authored
Jul 28, 2010
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes
parent
f7c98c86
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
matrix_operations.cu
modules/gpu/src/cuda/matrix_operations.cu
+3
-3
saturate_cast.hpp
modules/gpu/src/cuda/saturate_cast.hpp
+6
-6
matrix_operations.cpp
modules/gpu/src/matrix_operations.cpp
+1
-1
No files found.
modules/gpu/src/cuda/matrix_operations.cu
View file @
dc69cf3a
...
...
@@ -304,7 +304,7 @@ namespace cv
CopyToFunc func = tab[depth];
if (func == 0) cv::gpu::error("Unsupported co
nvert
operation", __FILE__, __LINE__);
if (func == 0) cv::gpu::error("Unsupported co
pyTo
operation", __FILE__, __LINE__);
func(mat_src, mat_dst, mask, channels, stream);
}
...
...
@@ -371,7 +371,7 @@ namespace cv
SetToFunc_without_mask func = tab[depth];
if (func == 0)
cv::gpu::error("Unsupported
convert
operation", __FILE__, __LINE__);
cv::gpu::error("Unsupported
setTo
operation", __FILE__, __LINE__);
func(mat, channels, stream);
}
...
...
@@ -396,7 +396,7 @@ namespace cv
SetToFunc_with_mask func = tab[depth];
if (func == 0)
cv::gpu::error("Unsupported
convert
operation", __FILE__, __LINE__);
cv::gpu::error("Unsupported
setTo
operation", __FILE__, __LINE__);
func(mat, mask, channels, stream);
}
...
...
modules/gpu/src/cuda/saturate_cast.hpp
View file @
dc69cf3a
...
...
@@ -73,7 +73,7 @@ namespace cv
{
int
iv
=
__float2int_rn
(
v
);
return
saturate_cast
<
uchar
>
(
iv
);
}
template
<>
__device__
uchar
saturate_cast
<
uchar
>
(
double
v
)
{
#if defined
__CUDA_ARCH__
&& __CUDA_ARCH__ >= 130
#if defined
(__CUDA_ARCH__)
&& __CUDA_ARCH__ >= 130
int
iv
=
__double2int_rn
(
v
);
return
saturate_cast
<
uchar
>
(
iv
);
#else
return
saturate_cast
<
uchar
>
((
float
)
v
);
...
...
@@ -98,7 +98,7 @@ namespace cv
{
int
iv
=
__float2int_rn
(
v
);
return
saturate_cast
<
schar
>
(
iv
);
}
template
<>
__device__
schar
saturate_cast
<
schar
>
(
double
v
)
{
#if defined
__CUDA_ARCH__
&& __CUDA_ARCH__ >= 130
#if defined
(__CUDA_ARCH__)
&& __CUDA_ARCH__ >= 130
int
iv
=
__double2int_rn
(
v
);
return
saturate_cast
<
schar
>
(
iv
);
#else
return
saturate_cast
<
schar
>
((
float
)
v
);
...
...
@@ -117,7 +117,7 @@ namespace cv
{
int
iv
=
__float2int_rn
(
v
);
return
saturate_cast
<
ushort
>
(
iv
);
}
template
<>
__device__
ushort
saturate_cast
<
ushort
>
(
double
v
)
{
#if defined
__CUDA_ARCH__
&& __CUDA_ARCH__ >= 130
#if defined
(__CUDA_ARCH__)
&& __CUDA_ARCH__ >= 130
int
iv
=
__double2int_rn
(
v
);
return
saturate_cast
<
ushort
>
(
iv
);
#else
return
saturate_cast
<
ushort
>
((
float
)
v
);
...
...
@@ -137,7 +137,7 @@ namespace cv
{
int
iv
=
__float2int_rn
(
v
);
return
saturate_cast
<
short
>
(
iv
);
}
template
<>
__device__
short
saturate_cast
<
short
>
(
double
v
)
{
#if defined
__CUDA_ARCH__
&& __CUDA_ARCH__ >= 130
#if defined
(__CUDA_ARCH__)
&& __CUDA_ARCH__ >= 130
int
iv
=
__double2int_rn
(
v
);
return
saturate_cast
<
short
>
(
iv
);
#else
return
saturate_cast
<
short
>
((
float
)
v
);
...
...
@@ -147,7 +147,7 @@ namespace cv
template
<>
__device__
int
saturate_cast
<
int
>
(
float
v
)
{
return
__float2int_rn
(
v
);
}
template
<>
__device__
int
saturate_cast
<
int
>
(
double
v
)
{
#if defined
__CUDA_ARCH__
&& __CUDA_ARCH__ >= 130
#if defined
(__CUDA_ARCH__)
&& __CUDA_ARCH__ >= 130
return
__double2int_rn
(
v
);
#else
return
saturate_cast
<
int
>
((
float
)
v
);
...
...
@@ -157,7 +157,7 @@ namespace cv
template
<>
__device__
uint
saturate_cast
<
uint
>
(
float
v
){
return
__float2uint_rn
(
v
);
}
template
<>
__device__
uint
saturate_cast
<
uint
>
(
double
v
)
{
#if defined
__CUDA_ARCH__ && __CUDA_ARCH__ >= 130
#if defined
(__CUDA_ARCH__) && __CUDA_ARCH__ >= 130
return
__double2uint_rn
(
v
);
#else
return
saturate_cast
<
uint
>
((
float
)
v
);
...
...
modules/gpu/src/matrix_operations.cpp
View file @
dc69cf3a
...
...
@@ -149,7 +149,7 @@ void cv::gpu::GpuMat::convertTo( GpuMat& dst, int rtype, double alpha, double be
GpuMat
&
GpuMat
::
operator
=
(
const
Scalar
&
s
)
{
cv
::
gpu
::
impl
::
set_to_without_mask
(
*
this
,
depth
(),
s
.
val
,
channels
());
impl
::
set_to_without_mask
(
*
this
,
depth
(),
s
.
val
,
channels
());
return
*
this
;
}
...
...
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