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
0e58853b
Commit
0e58853b
authored
Mar 26, 2013
by
Andrey Kamaev
Committed by
OpenCV Buildbot
Mar 26, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #706 from taka-no-me:str_gpumat
parents
69c9fe35
5fd58a01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
gpumat.cpp
modules/core/src/gpumat.cpp
+22
-14
No files found.
modules/core/src/gpumat.cpp
View file @
0e58853b
...
...
@@ -42,7 +42,7 @@
#include "precomp.hpp"
#include "opencv2/core/gpumat.hpp"
#include <
iostream
>
#include <
cctype
>
#ifdef HAVE_CUDA
#include <cuda_runtime.h>
...
...
@@ -81,9 +81,8 @@ namespace
{
if
(
err
<
0
)
{
std
::
ostringstream
msg
;
msg
<<
"NPP API Call Error: "
<<
err
;
cv
::
gpu
::
error
(
msg
.
str
().
c_str
(),
file
,
line
,
func
);
String
msg
=
cv
::
format
(
"NPP API Call Error: %d"
,
err
);
cv
::
gpu
::
error
(
msg
.
c_str
(),
file
,
line
,
func
);
}
}
}
...
...
@@ -220,16 +219,25 @@ namespace
void
CudaArch
::
fromStr
(
const
String
&
set_as_str
,
std
::
vector
<
int
>&
arr
)
{
if
(
set_as_str
.
find_first_not_of
(
" "
)
==
String
::
npos
)
return
;
arr
.
clear
();
std
::
istringstream
stream
(
set_as_str
);
int
cur_value
;
while
(
!
stream
.
eof
())
size_t
pos
=
0
;
while
(
pos
<
set_as_str
.
size
())
{
stream
>>
cur_value
;
arr
.
push_back
(
cur_value
);
if
(
isspace
(
set_as_str
[
pos
]))
{
++
pos
;
}
else
{
int
cur_value
;
int
chars_read
;
int
args_read
=
sscanf
(
set_as_str
.
c_str
()
+
pos
,
"%d%n"
,
&
cur_value
,
&
chars_read
);
CV_Assert
(
args_read
==
2
);
arr
.
push_back
(
cur_value
);
pos
+=
chars_read
;
}
}
std
::
sort
(
arr
.
begin
(),
arr
.
end
());
...
...
@@ -1570,8 +1578,8 @@ void cv::gpu::error(const char *error_string, const char *file, const int line,
const
char
*
errorStr
=
cvErrorStr
(
code
);
const
char
*
function
=
func
?
func
:
"unknown function"
;
std
::
cerr
<<
"OpenCV Error: "
<<
errorStr
<<
"("
<<
error_string
<<
") in "
<<
function
<<
", file "
<<
file
<<
", line "
<<
line
;
std
::
cerr
.
flush
(
);
fprintf
(
stderr
,
"OpenCV Error: %s(%s) in %s, file %s, line %d"
,
errorStr
,
error_string
,
function
,
file
,
line
)
;
fflush
(
stderr
);
}
else
cv
::
error
(
cv
::
Exception
(
code
,
error_string
,
func
,
file
,
line
)
);
...
...
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