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
2db2d137
Commit
2db2d137
authored
Aug 01, 2016
by
Tomoaki Teshima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
follow the naming rule as other API
* stop using 'CUDA' prefix * add explanation
parent
b2698f24
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
cuda.hpp
modules/core/include/opencv2/core/cuda.hpp
+8
-1
gpu_mat.cu
modules/core/src/cuda/gpu_mat.cu
+1
-1
test_cvt.cu
modules/cudev/test/test_cvt.cu
+6
-6
No files found.
modules/core/include/opencv2/core/cuda.hpp
View file @
2db2d137
...
@@ -855,7 +855,14 @@ private:
...
@@ -855,7 +855,14 @@ private:
CV_EXPORTS
void
printCudaDeviceInfo
(
int
device
);
CV_EXPORTS
void
printCudaDeviceInfo
(
int
device
);
CV_EXPORTS
void
printShortCudaDeviceInfo
(
int
device
);
CV_EXPORTS
void
printShortCudaDeviceInfo
(
int
device
);
CV_EXPORTS
void
convertFp16Cuda
(
InputArray
_src
,
OutputArray
_dst
,
Stream
&
stream
=
Stream
::
Null
());
/** @brief Converts an array to half precision floating number.
@param _src input array.
@param _dst output array.
@param stream Stream for the asynchronous version.
@sa convertFp16
*/
CV_EXPORTS
void
convertFp16
(
InputArray
_src
,
OutputArray
_dst
,
Stream
&
stream
=
Stream
::
Null
());
//! @} cudacore_init
//! @} cudacore_init
...
...
modules/core/src/cuda/gpu_mat.cu
View file @
2db2d137
...
@@ -594,7 +594,7 @@ void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, double alpha, doub
...
@@ -594,7 +594,7 @@ void cv::cuda::GpuMat::convertTo(OutputArray _dst, int rtype, double alpha, doub
funcs[sdepth][ddepth](reshape(1), dst.reshape(1), alpha, beta, stream);
funcs[sdepth][ddepth](reshape(1), dst.reshape(1), alpha, beta, stream);
}
}
void cv::cuda::convertFp16
Cuda
(InputArray _src, OutputArray _dst, Stream& stream)
void cv::cuda::convertFp16(InputArray _src, OutputArray _dst, Stream& stream)
{
{
GpuMat src = _src.getGpuMat();
GpuMat src = _src.getGpuMat();
int ddepth = 0;
int ddepth = 0;
...
...
modules/cudev/test/test_cvt.cu
View file @
2db2d137
...
@@ -101,11 +101,11 @@ public:
...
@@ -101,11 +101,11 @@ public:
GpuMat g_dst;
GpuMat g_dst;
// Fp32 -> Fp16
// Fp32 -> Fp16
c
onvertFp16Cuda
(g_src, g_dst);
c
uda::convertFp16
(g_src, g_dst);
c
onvertFp16Cuda(g_dst.clone(), g_
dst);
c
v::convertFp16(src,
dst);
// Fp16 -> Fp32
// Fp16 -> Fp32
c
onvertFp16(src,
dst);
c
uda::convertFp16(g_dst.clone(), g_
dst);
convertFp16(dst, ref);
c
v::c
onvertFp16(dst, ref);
g_dst.download(dst);
g_dst.download(dst);
EXPECT_MAT_NEAR(dst, ref, 0.0);
EXPECT_MAT_NEAR(dst, ref, 0.0);
...
@@ -127,8 +127,8 @@ public:
...
@@ -127,8 +127,8 @@ public:
GpuMat g_dst;
GpuMat g_dst;
// Fp32 -> Fp16
// Fp32 -> Fp16
c
onvertFp16Cuda
(g_src, g_dst);
c
uda::convertFp16
(g_src, g_dst);
convertFp16(src, ref);
c
v::c
onvertFp16(src, ref);
g_dst.download(dst);
g_dst.download(dst);
EXPECT_MAT_NEAR(dst, ref, 0.0);
EXPECT_MAT_NEAR(dst, ref, 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