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
16d1bbf2
Commit
16d1bbf2
authored
Jun 27, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnn: fix build
- winpack - opencv_world
parent
ef2e5a9f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
22 deletions
+17
-22
halide_scheduler.cpp
modules/dnn/src/halide_scheduler.cpp
+1
-0
op_halide.cpp
modules/dnn/src/op_halide.cpp
+1
-0
THDiskFile.cpp
modules/dnn/src/torch/THDiskFile.cpp
+1
-0
THFile.cpp
modules/dnn/src/torch/THFile.cpp
+1
-0
THFile.h
modules/dnn/src/torch/THFile.h
+1
-1
THGeneral.cpp
modules/dnn/src/torch/THGeneral.cpp
+12
-19
THGeneral.h
modules/dnn/src/torch/THGeneral.h
+0
-2
No files found.
modules/dnn/src/halide_scheduler.cpp
View file @
16d1bbf2
...
...
@@ -5,6 +5,7 @@
// Copyright (C) 2017, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
#include "precomp.hpp"
#include "halide_scheduler.hpp"
#include "op_halide.hpp"
...
...
modules/dnn/src/op_halide.cpp
View file @
16d1bbf2
...
...
@@ -5,6 +5,7 @@
// Copyright (C) 2017, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective owners.
#include "precomp.hpp"
#include "op_halide.hpp"
#ifdef HAVE_HALIDE
...
...
modules/dnn/src/torch/THDiskFile.cpp
View file @
16d1bbf2
#include "../precomp.hpp"
#if defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
#include "THGeneral.h"
#include "THDiskFile.h"
...
...
modules/dnn/src/torch/THFile.cpp
View file @
16d1bbf2
#include "../precomp.hpp"
#if defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
#include "THFile.h"
#include "THFilePrivate.h"
...
...
modules/dnn/src/torch/THFile.h
View file @
16d1bbf2
...
...
@@ -3,8 +3,8 @@
//#include "THStorage.h"
#if defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
#include "THGeneral.h"
#include "opencv2/core/hal/interface.h"
#include "THGeneral.h"
typedef
struct
THFile__
THFile
;
...
...
modules/dnn/src/torch/THGeneral.cpp
View file @
16d1bbf2
#include "../precomp.hpp"
#if defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
#include <opencv2/core.hpp>
...
...
@@ -14,7 +15,9 @@ extern "C"
{
#ifndef TH_HAVE_THREAD
#define __thread
#define TH_THREAD
#else
#define TH_THREAD __thread
#endif
/* Torch Error Handling */
...
...
@@ -23,8 +26,8 @@ static void defaultTorchErrorHandlerFunction(const char *msg, void*)
CV_Error
(
cv
::
Error
::
StsError
,
cv
::
String
(
"Torch Error: "
)
+
msg
);
}
static
__thread
void
(
*
torchErrorHandlerFunction
)(
const
char
*
msg
,
void
*
data
)
=
defaultTorchErrorHandlerFunction
;
static
__thread
void
*
torchErrorHandlerData
;
static
TH_THREAD
void
(
*
torchErrorHandlerFunction
)(
const
char
*
msg
,
void
*
data
)
=
defaultTorchErrorHandlerFunction
;
static
TH_THREAD
void
*
torchErrorHandlerData
;
void
_THError
(
const
char
*
file
,
const
int
line
,
const
char
*
fmt
,
...)
{
...
...
@@ -71,8 +74,8 @@ static void defaultTorchArgErrorHandlerFunction(int argNumber, const char *msg,
CV_Error
(
cv
::
Error
::
StsError
,
cv
::
format
(
"Invalid argument %d"
,
argNumber
));
}
static
__thread
void
(
*
torchArgErrorHandlerFunction
)(
int
argNumber
,
const
char
*
msg
,
void
*
data
)
=
defaultTorchArgErrorHandlerFunction
;
static
__thread
void
*
torchArgErrorHandlerData
;
static
TH_THREAD
void
(
*
torchArgErrorHandlerFunction
)(
int
argNumber
,
const
char
*
msg
,
void
*
data
)
=
defaultTorchArgErrorHandlerFunction
;
static
TH_THREAD
void
*
torchArgErrorHandlerData
;
void
_THArgCheck
(
const
char
*
file
,
int
line
,
int
condition
,
int
argNumber
,
const
char
*
fmt
,
...)
{
...
...
@@ -103,10 +106,10 @@ void THSetArgErrorHandler( void (*torchArgErrorHandlerFunction_)(int argNumber,
torchArgErrorHandlerData
=
data
;
}
static
__thread
void
(
*
torchGCFunction
)(
void
*
data
)
=
NULL
;
static
__thread
void
*
torchGCData
;
static
__thread
long
torchHeapSize
=
0
;
static
__thread
long
torchHeapSizeSoftMax
=
300000000
;
// 300MB, adjusted upward dynamically
static
TH_THREAD
void
(
*
torchGCFunction
)(
void
*
data
)
=
NULL
;
static
TH_THREAD
void
*
torchGCData
;
static
TH_THREAD
long
torchHeapSize
=
0
;
static
TH_THREAD
long
torchHeapSizeSoftMax
=
300000000
;
// 300MB, adjusted upward dynamically
/* Optional hook for integrating with a garbage-collected frontend.
*
...
...
@@ -242,15 +245,5 @@ void THFree(void *ptr)
free
(
ptr
);
}
double
THLog1p
(
const
double
x
)
{
#if (defined(_MSC_VER) || defined(__MINGW32__))
volatile
double
y
=
1
+
x
;
return
log
(
y
)
-
((
y
-
1
)
-
x
)
/
y
;
/* cancels errors with IEEE arithmetic */
#else
return
log1p
(
x
);
#endif
}
}
#endif
modules/dnn/src/torch/THGeneral.h
View file @
16d1bbf2
...
...
@@ -30,7 +30,6 @@
# define M_PI 3.14159265358979323846
#endif
TH_API
double
THLog1p
(
const
double
x
);
TH_API
void
_THError
(
const
char
*
file
,
const
int
line
,
const
char
*
fmt
,
...);
TH_API
void
_THAssertionFailed
(
const
char
*
file
,
const
int
line
,
const
char
*
exp
,
const
char
*
fmt
,
...);
TH_API
void
THSetErrorHandler
(
void
(
*
torchErrorHandlerFunction
)(
const
char
*
msg
,
void
*
data
),
void
*
data
);
...
...
@@ -80,7 +79,6 @@ do { \
#define THMax(X, Y) ((X) > (Y) ? (X) : (Y))
#if (defined(_MSC_VER) || defined(__MINGW32__))
# define log1p(x) THLog1p(x)
#define snprintf _snprintf
#define popen _popen
#define pclose _pclose
...
...
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