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
eeb99726
Commit
eeb99726
authored
Nov 25, 2014
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get rid of cuda.h usage
parent
3dd1afe4
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
19 deletions
+17
-19
color.cpp
modules/gpu/src/color.cpp
+2
-2
cu_safe_call.cpp
modules/gpu/src/cu_safe_call.cpp
+1
-1
cu_safe_call.h
modules/gpu/src/cu_safe_call.h
+1
-1
cudastream.cpp
modules/gpu/src/cudastream.cpp
+2
-2
graphcuts.cpp
modules/gpu/src/graphcuts.cpp
+4
-4
matrix_reductions.cpp
modules/gpu/src/matrix_reductions.cpp
+3
-3
precomp.hpp
modules/gpu/src/precomp.hpp
+1
-2
test_color.cpp
modules/gpu/test/test_color.cpp
+2
-2
test_precomp.hpp
modules/gpu/test/test_precomp.hpp
+0
-1
test_stream.cpp
modules/gpu/test/test_stream.cpp
+1
-1
No files found.
modules/gpu/src/color.cpp
View file @
eeb99726
...
...
@@ -1577,7 +1577,7 @@ namespace
void
rgba_to_mbgra
(
const
GpuMat
&
src
,
GpuMat
&
dst
,
int
,
Stream
&
st
)
{
#if (CUDA_VERSION < 5000)
#if (CUDA
RT
_VERSION < 5000)
(
void
)
src
;
(
void
)
dst
;
(
void
)
st
;
...
...
@@ -1947,7 +1947,7 @@ void cv::gpu::swapChannels(GpuMat& image, const int dstOrder[4], Stream& s)
void
cv
::
gpu
::
gammaCorrection
(
const
GpuMat
&
src
,
GpuMat
&
dst
,
bool
forward
,
Stream
&
stream
)
{
#if (CUDA_VERSION < 5000)
#if (CUDA
RT
_VERSION < 5000)
(
void
)
src
;
(
void
)
dst
;
(
void
)
forward
;
...
...
modules/gpu/src/cu_safe_call.cpp
View file @
eeb99726
...
...
@@ -42,7 +42,7 @@
#include "cu_safe_call.h"
#if
def HAVE_CUDA
#if
defined(HAVE_CUDA) && defined(HAVE_NVCUVID)
namespace
{
...
...
modules/gpu/src/cu_safe_call.h
View file @
eeb99726
...
...
@@ -45,7 +45,7 @@
#include "precomp.hpp"
#if
def HAVE_CUDA
#if
defined(HAVE_CUDA) && defined(HAVE_NVCUVID)
namespace
cv
{
namespace
gpu
{
namespace
detail
...
...
modules/gpu/src/cudastream.cpp
View file @
eeb99726
...
...
@@ -270,7 +270,7 @@ void cv::gpu::Stream::enqueueConvert(const GpuMat& src, GpuMat& dst, int dtype,
convertTo
(
src
,
dst
,
alpha
,
beta
,
stream
);
}
#if CUDA_VERSION >= 5000
#if CUDA
RT
_VERSION >= 5000
namespace
{
...
...
@@ -293,7 +293,7 @@ namespace
void
cv
::
gpu
::
Stream
::
enqueueHostCallback
(
StreamCallback
callback
,
void
*
userData
)
{
#if CUDA_VERSION >= 5000
#if CUDA
RT
_VERSION >= 5000
CallbackData
*
data
=
new
CallbackData
;
data
->
callback
=
callback
;
data
->
userData
=
userData
;
...
...
modules/gpu/src/graphcuts.cpp
View file @
eeb99726
...
...
@@ -144,7 +144,7 @@ namespace
void
cv
::
gpu
::
graphcut
(
GpuMat
&
terminals
,
GpuMat
&
leftTransp
,
GpuMat
&
rightTransp
,
GpuMat
&
top
,
GpuMat
&
bottom
,
GpuMat
&
labels
,
GpuMat
&
buf
,
Stream
&
s
)
{
#if (CUDA_VERSION < 5000)
#if (CUDA
RT
_VERSION < 5000)
CV_Assert
(
terminals
.
type
()
==
CV_32S
);
#else
CV_Assert
(
terminals
.
type
()
==
CV_32S
||
terminals
.
type
()
==
CV_32F
);
...
...
@@ -181,7 +181,7 @@ void cv::gpu::graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTrans
NppiGraphcutStateHandler
state
(
sznpp
,
buf
.
ptr
<
Npp8u
>
(),
nppiGraphcutInitAlloc
);
#if (CUDA_VERSION < 5000)
#if (CUDA
RT
_VERSION < 5000)
nppSafeCall
(
nppiGraphcut_32s8u
(
terminals
.
ptr
<
Npp32s
>
(),
leftTransp
.
ptr
<
Npp32s
>
(),
rightTransp
.
ptr
<
Npp32s
>
(),
top
.
ptr
<
Npp32s
>
(),
bottom
.
ptr
<
Npp32s
>
(),
static_cast
<
int
>
(
terminals
.
step
),
static_cast
<
int
>
(
leftTransp
.
step
),
sznpp
,
labels
.
ptr
<
Npp8u
>
(),
static_cast
<
int
>
(
labels
.
step
),
state
)
);
#else
...
...
@@ -204,7 +204,7 @@ void cv::gpu::graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTrans
void
cv
::
gpu
::
graphcut
(
GpuMat
&
terminals
,
GpuMat
&
leftTransp
,
GpuMat
&
rightTransp
,
GpuMat
&
top
,
GpuMat
&
topLeft
,
GpuMat
&
topRight
,
GpuMat
&
bottom
,
GpuMat
&
bottomLeft
,
GpuMat
&
bottomRight
,
GpuMat
&
labels
,
GpuMat
&
buf
,
Stream
&
s
)
{
#if (CUDA_VERSION < 5000)
#if (CUDA
RT
_VERSION < 5000)
CV_Assert
(
terminals
.
type
()
==
CV_32S
);
#else
CV_Assert
(
terminals
.
type
()
==
CV_32S
||
terminals
.
type
()
==
CV_32F
);
...
...
@@ -253,7 +253,7 @@ void cv::gpu::graphcut(GpuMat& terminals, GpuMat& leftTransp, GpuMat& rightTrans
NppiGraphcutStateHandler
state
(
sznpp
,
buf
.
ptr
<
Npp8u
>
(),
nppiGraphcut8InitAlloc
);
#if (CUDA_VERSION < 5000)
#if (CUDA
RT
_VERSION < 5000)
nppSafeCall
(
nppiGraphcut8_32s8u
(
terminals
.
ptr
<
Npp32s
>
(),
leftTransp
.
ptr
<
Npp32s
>
(),
rightTransp
.
ptr
<
Npp32s
>
(),
top
.
ptr
<
Npp32s
>
(),
topLeft
.
ptr
<
Npp32s
>
(),
topRight
.
ptr
<
Npp32s
>
(),
bottom
.
ptr
<
Npp32s
>
(),
bottomLeft
.
ptr
<
Npp32s
>
(),
bottomRight
.
ptr
<
Npp32s
>
(),
...
...
modules/gpu/src/matrix_reductions.cpp
View file @
eeb99726
...
...
@@ -132,7 +132,7 @@ void cv::gpu::meanStdDev(const GpuMat& src, Scalar& mean, Scalar& stddev, GpuMat
DeviceBuffer
dbuf
(
2
);
int
bufSize
;
#if (CUDA_VERSION <= 4020)
#if (CUDA
RT
_VERSION <= 4020)
nppSafeCall
(
nppiMeanStdDev8uC1RGetBufferHostSize
(
sz
,
&
bufSize
)
);
#else
nppSafeCall
(
nppiMeanStdDevGetBufferHostSize_8u_C1R
(
sz
,
&
bufSize
)
);
...
...
@@ -187,7 +187,7 @@ double cv::gpu::norm(const GpuMat& src1, const GpuMat& src2, int normType)
CV_Assert
(
src1
.
size
()
==
src2
.
size
()
&&
src1
.
type
()
==
src2
.
type
());
CV_Assert
(
normType
==
NORM_INF
||
normType
==
NORM_L1
||
normType
==
NORM_L2
);
#if CUDA_VERSION < 5050
#if CUDA
RT
_VERSION < 5050
typedef
NppStatus
(
*
func_t
)(
const
Npp8u
*
pSrc1
,
int
nSrcStep1
,
const
Npp8u
*
pSrc2
,
int
nSrcStep2
,
NppiSize
oSizeROI
,
Npp64f
*
pRetVal
);
static
const
func_t
funcs
[]
=
{
nppiNormDiff_Inf_8u_C1R
,
nppiNormDiff_L1_8u_C1R
,
nppiNormDiff_L2_8u_C1R
};
...
...
@@ -212,7 +212,7 @@ double cv::gpu::norm(const GpuMat& src1, const GpuMat& src2, int normType)
DeviceBuffer
dbuf
;
#if CUDA_VERSION < 5050
#if CUDA
RT
_VERSION < 5050
nppSafeCall
(
funcs
[
funcIdx
](
src1
.
ptr
<
Npp8u
>
(),
static_cast
<
int
>
(
src1
.
step
),
src2
.
ptr
<
Npp8u
>
(),
static_cast
<
int
>
(
src2
.
step
),
sz
,
dbuf
)
);
#else
int
bufSize
;
...
...
modules/gpu/src/precomp.hpp
View file @
eeb99726
...
...
@@ -82,8 +82,6 @@
#define OPENCV_GPU_UNUSED(x) (void)x
#ifdef HAVE_CUDA
#include <cuda.h>
#include <cuda_runtime.h>
#include <npp.h>
...
...
@@ -96,6 +94,7 @@
#endif
#ifdef HAVE_NVCUVID
#include <cuda.h>
#include <nvcuvid.h>
#ifdef WIN32
...
...
modules/gpu/test/test_color.cpp
View file @
eeb99726
...
...
@@ -2048,7 +2048,7 @@ GPU_TEST_P(CvtColor, Luv2LRGBA)
EXPECT_MAT_NEAR
(
dst_gold
,
dst
,
depth
==
CV_8U
?
1
:
1e-4
);
}
#if defined (CUDA
_VERSION) && (CUDA
_VERSION >= 5000)
#if defined (CUDA
RT_VERSION) && (CUDART
_VERSION >= 5000)
GPU_TEST_P
(
CvtColor
,
RGBA2mRGBA
)
{
...
...
@@ -2066,7 +2066,7 @@ GPU_TEST_P(CvtColor, RGBA2mRGBA)
EXPECT_MAT_NEAR
(
dst_gold
,
dst
,
1
);
}
#endif // defined (CUDA
_VERSION) && (CUDA
_VERSION >= 5000)
#endif // defined (CUDA
RT_VERSION) && (CUDART
_VERSION >= 5000)
GPU_TEST_P
(
CvtColor
,
BayerBG2BGR
)
{
...
...
modules/gpu/test/test_precomp.hpp
View file @
eeb99726
...
...
@@ -67,7 +67,6 @@
#include "cvconfig.h"
#ifdef HAVE_CUDA
#include <cuda.h>
#include <cuda_runtime.h>
#include "opencv2/ts/ts.hpp"
...
...
modules/gpu/test/test_stream.cpp
View file @
eeb99726
...
...
@@ -46,7 +46,7 @@
using
namespace
cvtest
;
#if CUDA_VERSION >= 5000
#if CUDA
RT
_VERSION >= 5000
struct
Async
:
testing
::
TestWithParam
<
cv
::
gpu
::
DeviceInfo
>
{
...
...
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