Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
98d9703d
Commit
98d9703d
authored
Jul 18, 2018
by
Davis King
Browse files
Fixed cblas conflicts in some environments.
parent
4c816be0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
dlib/matrix/cblas_constants.h
dlib/matrix/cblas_constants.h
+12
-2
dlib/matrix/matrix_blas_bindings.h
dlib/matrix/matrix_blas_bindings.h
+2
-5
dlib/matrix/matrix_trsm.h
dlib/matrix/matrix_trsm.h
+2
-6
No files found.
dlib/matrix/cblas_constants.h
View file @
98d9703d
...
...
@@ -3,7 +3,17 @@
#ifndef DLIB_CBLAS_CONSTAnTS_Hh_
#define DLIB_CBLAS_CONSTAnTS_Hh_
#ifndef CBLAS_H
#if !(defined(__GSL_CBLAS_H__) || defined(CBLAS_H))
// Setting this tells other headers to define their own copy of the cblas API so we can
// call it. We only do this if some other cblas API hasn't already been included.
#define DLIB_DEFINE_CBLAS_API
#ifndef CBLAS_INT_TYPE
#define CBLAS_INT_TYPE int
#endif
namespace
dlib
{
namespace
blas_bindings
...
...
@@ -16,7 +26,7 @@ namespace dlib
}
}
#endif
// if not CBLAS_H
#endif
#endif // DLIB_CBLAS_CONSTAnTS_Hh_
dlib/matrix/matrix_blas_bindings.h
View file @
98d9703d
...
...
@@ -46,12 +46,9 @@ namespace dlib
#define DLIB_TEST_BLAS_BINDING_SCAL
#endif
#if
n
def CBLAS_
H
#ifdef
DLIB_DEFINE_
CBLAS_
API
extern
"C"
{
#ifndef CBLAS_INT_TYPE
#define CBLAS_INT_TYPE int
#endif
// Here we declare the prototypes for the CBLAS calls used by the BLAS bindings below
void
cblas_saxpy
(
const
CBLAS_INT_TYPE
N
,
const
float
alpha
,
const
float
*
X
,
...
...
@@ -139,7 +136,7 @@ namespace dlib
const
void
*
alpha
,
const
void
*
X
,
const
CBLAS_INT_TYPE
incX
,
const
void
*
Y
,
const
CBLAS_INT_TYPE
incY
,
void
*
A
,
const
CBLAS_INT_TYPE
lda
);
}
#endif // if
not
CBLAS_
H
#endif // if
DLIB_DEFINE_
CBLAS_
API
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
dlib/matrix/matrix_trsm.h
View file @
98d9703d
...
...
@@ -10,11 +10,7 @@ namespace dlib
namespace
blas_bindings
{
#ifdef DLIB_USE_BLAS
#ifndef CBLAS_H
#ifndef CBLAS_INT_TYPE
#define CBLAS_INT_TYPE int
#endif
#ifdef DLIB_DEFINE_CBLAS_API
extern
"C"
{
void
cblas_strsm
(
const
CBLAS_ORDER
Order
,
const
CBLAS_SIDE
Side
,
...
...
@@ -29,7 +25,7 @@ namespace dlib
const
double
alpha
,
const
double
*
A
,
const
CBLAS_INT_TYPE
lda
,
double
*
B
,
const
CBLAS_INT_TYPE
ldb
);
}
#endif // if
not
CBLAS_
H
#endif // if
DLIB_DEFINE_
CBLAS_
API
#endif // if DLIB_USE_BLAS
// ------------------------------------------------------------------------------------
...
...
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