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
464b8a57
Commit
464b8a57
authored
Nov 14, 2011
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed compilation under linux
parent
2695039a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
27 deletions
+22
-27
internal_shared.hpp
modules/gpu/src/cuda/internal_shared.hpp
+1
-0
safe_call.hpp
modules/gpu/src/cuda/safe_call.hpp
+1
-11
common.hpp
modules/gpu/src/opencv2/gpu/device/common.hpp
+20
-16
No files found.
modules/gpu/src/cuda/internal_shared.hpp
View file @
464b8a57
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
#include "NPP_staging.hpp"
#include "NPP_staging.hpp"
#include "opencv2/gpu/devmem2d.hpp"
#include "opencv2/gpu/devmem2d.hpp"
#include "safe_call.hpp"
#include "safe_call.hpp"
#include "opencv2/gpu/device/common.hpp"
namespace
cv
{
namespace
gpu
namespace
cv
{
namespace
gpu
{
{
...
...
modules/gpu/src/cuda/safe_call.hpp
View file @
464b8a57
...
@@ -49,13 +49,11 @@
...
@@ -49,13 +49,11 @@
#include "NCV.hpp"
#include "NCV.hpp"
#if defined(__GNUC__)
#if defined(__GNUC__)
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__, __func__)
#define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, __func__)
#define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, __func__)
#define ncvSafeCall(expr) ___ncvSafeCall(expr, __FILE__, __LINE__, __func__)
#define ncvSafeCall(expr) ___ncvSafeCall(expr, __FILE__, __LINE__, __func__)
#define cufftSafeCall(expr) ___cufftSafeCall(expr, __FILE__, __LINE__, __func__)
#define cufftSafeCall(expr) ___cufftSafeCall(expr, __FILE__, __LINE__, __func__)
#define cublasSafeCall(expr) ___cublasSafeCall(expr, __FILE__, __LINE__, __func__)
#define cublasSafeCall(expr) ___cublasSafeCall(expr, __FILE__, __LINE__, __func__)
#else
/* defined(__CUDACC__) || defined(__MSVC__) */
#else
/* defined(__CUDACC__) || defined(__MSVC__) */
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__)
#define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__)
#define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__)
#define ncvSafeCall(expr) ___ncvSafeCall(expr, __FILE__, __LINE__)
#define ncvSafeCall(expr) ___ncvSafeCall(expr, __FILE__, __LINE__)
#define cufftSafeCall(expr) ___cufftSafeCall(expr, __FILE__, __LINE__)
#define cufftSafeCall(expr) ___cufftSafeCall(expr, __FILE__, __LINE__)
...
@@ -64,19 +62,12 @@
...
@@ -64,19 +62,12 @@
namespace
cv
{
namespace
gpu
namespace
cv
{
namespace
gpu
{
{
void
error
(
const
char
*
error_string
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
void
nppError
(
int
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
void
nppError
(
int
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
void
ncvError
(
int
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
void
ncvError
(
int
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
void
cufftError
(
int
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
void
cufftError
(
int
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
void
cublasError
(
int
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
void
cublasError
(
int
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
}}
}}
static
inline
void
___cudaSafeCall
(
cudaError_t
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
)
{
if
(
cudaSuccess
!=
err
)
cv
::
gpu
::
error
(
cudaGetErrorString
(
err
),
file
,
line
,
func
);
}
static
inline
void
___nppSafeCall
(
int
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
)
static
inline
void
___nppSafeCall
(
int
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
)
{
{
if
(
err
<
0
)
if
(
err
<
0
)
...
@@ -101,4 +92,4 @@ static inline void ___cublasSafeCall(cublasStatus_t err, const char *file, const
...
@@ -101,4 +92,4 @@ static inline void ___cublasSafeCall(cublasStatus_t err, const char *file, const
cv
::
gpu
::
cublasError
(
err
,
file
,
line
,
func
);
cv
::
gpu
::
cublasError
(
err
,
file
,
line
,
func
);
}
}
#endif
/* __OPENCV_CUDA_SAFE_CALL_HPP__ */
#endif
/* __OPENCV_CUDA_SAFE_CALL_HPP__ */
\ No newline at end of file
modules/gpu/src/opencv2/gpu/device/common.hpp
View file @
464b8a57
...
@@ -58,6 +58,25 @@
...
@@ -58,6 +58,25 @@
#endif
#endif
#endif
#endif
#if defined(__GNUC__)
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__, __func__)
#else
/* defined(__CUDACC__) || defined(__MSVC__) */
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__)
#endif
namespace
cv
{
namespace
gpu
{
void
error
(
const
char
*
error_string
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
}}
static
inline
void
___cudaSafeCall
(
cudaError_t
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
)
{
if
(
cudaSuccess
!=
err
)
cv
::
gpu
::
error
(
cudaGetErrorString
(
err
),
file
,
line
,
func
);
}
#ifdef __CUDACC__
namespace
cv
{
namespace
gpu
namespace
cv
{
namespace
gpu
{
{
__host__
__device__
__forceinline__
int
divUp
(
int
total
,
int
grain
)
__host__
__device__
__forceinline__
int
divUp
(
int
total
,
int
grain
)
...
@@ -80,21 +99,6 @@ namespace cv { namespace gpu
...
@@ -80,21 +99,6 @@ namespace cv { namespace gpu
}
}
}}
}}
#if defined(__GNUC__)
#endif // __CUDACC__
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__, __func__)
#else
/* defined(__CUDACC__) || defined(__MSVC__) */
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__)
#endif
namespace
cv
{
namespace
gpu
{
void
error
(
const
char
*
error_string
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
}}
static
inline
void
___cudaSafeCall
(
cudaError_t
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
)
{
if
(
cudaSuccess
!=
err
)
cv
::
gpu
::
error
(
cudaGetErrorString
(
err
),
file
,
line
,
func
);
}
#endif // __OPENCV_GPU_COMMON_HPP__
#endif // __OPENCV_GPU_COMMON_HPP__
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