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
55b1e9cb
Commit
55b1e9cb
authored
Jul 15, 2010
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added safe call support in cu files
parent
2c84a66e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
19 deletions
+19
-19
cuda_shared.hpp
modules/gpu/cuda/cuda_shared.hpp
+7
-1
stereobm.cu
modules/gpu/cuda/stereobm.cu
+0
-1
precomp.cpp
modules/gpu/src/precomp.cpp
+6
-0
precomp.hpp
modules/gpu/src/precomp.hpp
+6
-17
No files found.
modules/gpu/cuda/cuda_shared.hpp
View file @
55b1e9cb
...
...
@@ -51,7 +51,9 @@ namespace cv
{
typedef
unsigned
char
uchar
;
typedef
unsigned
short
ushort
;
typedef
unsigned
int
uint
;
typedef
unsigned
int
uint
;
extern
"C"
void
error
(
const
char
*
error_string
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
);
namespace
impl
{
...
...
@@ -62,4 +64,8 @@ namespace cv
}
}
#ifdef __CUDACC__
#define cudaSafeCall(err) { if( cudaSuccess != err) cv::gpu::error(cudaGetErrorString(err), __FILE__, __LINE__); }
#endif
#endif
/* __OPENCV_CUDA_SHARED_HPP__ */
modules/gpu/cuda/stereobm.cu
View file @
55b1e9cb
...
...
@@ -297,7 +297,6 @@ extern "C" void cv::gpu::impl::stereoBM_GPU(const DevMem2D& left, const DevMem2D
size_t smem_size = (BLOCK_W + N_DISPARITIES * SHARED_MEM_SIZE) * sizeof(unsigned int);
#define cudaSafeCall
cudaSafeCall( cudaMemset2D(disp.ptr, disp.step, 0, disp.cols, disp. rows) );
cudaSafeCall( cudaMemset2D(minSSD_buf.ptr, minSSD_buf.step, 0xFF, minSSD_buf.cols * minSSD_buf.elemSize(), disp. rows) );
...
...
modules/gpu/src/precomp.cpp
View file @
55b1e9cb
...
...
@@ -42,3 +42,9 @@
#include "precomp.hpp"
/* End of file. */
extern
"C"
void
cv
::
gpu
::
error
(
const
char
*
error_string
,
const
char
*
file
,
const
int
line
,
const
char
*
func
)
{
cv
::
error
(
cv
::
Exception
(
CV_GpuApiCallError
,
error_string
,
func
,
file
,
line
)
);
}
modules/gpu/src/precomp.hpp
View file @
55b1e9cb
...
...
@@ -70,25 +70,14 @@
#include "cuda_runtime_api.h"
#define cudaCallerSafeCall(err) err;
#ifdef __GNUC__
#define cudaSafeCall(err) __cudaSafeCall(err, __FILE__, __LINE__, __func__)
#else
#define cudaSafeCall(err) __cudaSafeCall(err, __FILE__, __LINE__)
#ifdef __GNUC__
#define cudaSafeCall(err) { if(cudaSuccess != err) cv::gpu::error(cudaGetErrorString(err), __FILE__, __LINE__, __func__); }
#else
#define cudaSafeCall(err) { if(cudaSuccess != err) cv::gpu::error(cudaGetErrorString(err), __FILE__, __LINE__); }
#endif
namespace
cv
{
namespace
gpu
{
static
inline
void
__cudaSafeCall
(
cudaError
err
,
const
char
*
file
,
const
int
line
,
const
char
*
func
=
""
)
{
if
(
cudaSuccess
!=
err
)
cv
::
error
(
cv
::
Exception
(
CV_GpuApiCallError
,
cudaGetErrorString
(
err
),
func
,
file
,
line
)
);
}
}
}
#define cudaCallerSafeCall(err) err;
#endif
/* HAVE_CUDA */
...
...
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