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
cba5235f
Commit
cba5235f
authored
May 19, 2014
by
Roman Donchenko
Committed by
OpenCV Buildbot
May 19, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2698 from GregoryMorse:patch-2
parents
f0b0d4e8
b1443bc1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
13 deletions
+24
-13
ocl.cpp
modules/core/src/ocl.cpp
+13
-0
system.cpp
modules/core/src/system.cpp
+8
-12
matching.cpp
modules/objdetect/src/matching.cpp
+3
-1
No files found.
modules/core/src/ocl.cpp
View file @
cba5235f
...
...
@@ -60,7 +60,11 @@
// TODO Move to some common place
static
size_t
getConfigurationParameterForSize
(
const
char
*
name
,
size_t
defaultValue
)
{
#ifdef HAVE_WINRT
const
char
*
envValue
=
NULL
;
#else
const
char
*
envValue
=
getenv
(
name
);
#endif
if
(
envValue
==
NULL
)
{
return
defaultValue
;
...
...
@@ -685,12 +689,14 @@ static void* initOpenCLAndLoad(const char* funcname)
static
HMODULE
handle
=
0
;
if
(
!
handle
)
{
#ifndef HAVE_WINRT
if
(
!
initialized
)
{
handle
=
LoadLibraryA
(
"OpenCL.dll"
);
initialized
=
true
;
g_haveOpenCL
=
handle
!=
0
&&
GetProcAddress
(
handle
,
oclFuncToCheck
)
!=
0
;
}
#endif
if
(
!
handle
)
return
0
;
}
...
...
@@ -2145,6 +2151,12 @@ static bool parseOpenCLDeviceConfiguration(const std::string& configurationStr,
return
true
;
}
#ifdef HAVE_WINRT
static
cl_device_id
selectOpenCLDevice
()
{
return
NULL
;
}
#else
static
cl_device_id
selectOpenCLDevice
()
{
std
::
string
platform
,
deviceName
;
...
...
@@ -2289,6 +2301,7 @@ not_found:
CV_Error
(
CL_INVALID_DEVICE
,
"Requested OpenCL device is not found"
);
return
NULL
;
}
#endif
struct
Context
::
Impl
{
...
...
modules/core/src/system.cpp
View file @
cba5235f
...
...
@@ -442,27 +442,23 @@ String format( const char* fmt, ... )
String
tempfile
(
const
char
*
suffix
)
{
#ifdef HAVE_WINRT
std
::
wstring
temp_dir
=
L""
;
const
wchar_t
*
opencv_temp_dir
=
_wgetenv
(
L"OPENCV_TEMP_PATH"
);
if
(
opencv_temp_dir
)
temp_dir
=
std
::
wstring
(
opencv_temp_dir
);
#else
const
char
*
temp_dir
=
getenv
(
"OPENCV_TEMP_PATH"
);
String
fname
;
#ifndef HAVE_WINRT
const
char
*
temp_dir
=
getenv
(
"OPENCV_TEMP_PATH"
);
#endif
#if defined WIN32 || defined _WIN32
#ifdef HAVE_WINRT
RoInitialize
(
RO_INIT_MULTITHREADED
);
std
::
wstring
temp_dir2
;
if
(
temp_dir
.
empty
())
temp_dir
=
GetTempPathWinRT
();
std
::
wstring
temp_dir
=
L""
;
const
wchar_t
*
opencv_temp_dir
=
GetTempPathWinRT
().
c_str
();
if
(
opencv_temp_dir
)
temp_dir
=
std
::
wstring
(
opencv_temp_dir
);
std
::
wstring
temp_file
;
temp_file
=
GetTempFileNameWinRT
(
L"ocv"
);
if
(
temp_file
.
empty
())
return
std
::
s
tring
();
return
S
tring
();
temp_file
=
temp_dir
+
std
::
wstring
(
L"
\\
"
)
+
temp_file
;
DeleteFileW
(
temp_file
.
c_str
());
...
...
@@ -470,7 +466,7 @@ String tempfile( const char* suffix )
char
aname
[
MAX_PATH
];
size_t
copied
=
wcstombs
(
aname
,
temp_file
.
c_str
(),
MAX_PATH
);
CV_Assert
((
copied
!=
MAX_PATH
)
&&
(
copied
!=
(
size_t
)
-
1
));
fname
=
std
::
s
tring
(
aname
);
fname
=
S
tring
(
aname
);
RoUninitialize
();
#else
char
temp_dir2
[
MAX_PATH
]
=
{
0
};
...
...
modules/objdetect/src/matching.cpp
View file @
cba5235f
...
...
@@ -525,7 +525,9 @@ int addNullableBorder(CvLSVMFeatureMap *map, int bx, int by)
float
*
new_map
;
sizeX
=
map
->
sizeX
+
2
*
bx
;
sizeY
=
map
->
sizeY
+
2
*
by
;
new_map
=
(
float
*
)
malloc
(
sizeof
(
float
)
*
sizeX
*
sizeY
*
map
->
numFeatures
);
// fix for Windows Phone 8 ARM compiler
size_t
size
=
sizeof
(
float
)
*
sizeX
*
sizeY
*
map
->
numFeatures
;
new_map
=
(
float
*
)
malloc
(
size
);
for
(
i
=
0
;
i
<
sizeX
*
sizeY
*
map
->
numFeatures
;
i
++
)
{
new_map
[
i
]
=
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