Browse Source

Fixed #21. Added extern C to support C++. Thank Tasio for the patch.

tags/v0.1alpha2
Xianyi Zhang 14 years ago
parent
commit
0a45e5495f
3 changed files with 23 additions and 0 deletions
  1. +2
    -0
      Changelog.txt
  2. +11
    -0
      cblas.h
  3. +10
    -0
      common.h

+ 2
- 0
Changelog.txt View File

@@ -10,6 +10,8 @@ common:
on github) on github)
* Support "void goto_set_num_threads(int num_threads)" and "void * Support "void goto_set_num_threads(int num_threads)" and "void
openblas_set_num_threads(int num_threads)" when USE_OPENMP=1 openblas_set_num_threads(int num_threads)" when USE_OPENMP=1
* Added extern "C" to support C++. Thank Tasio for the patch(Refs
issue #21 on github)


x86/x86_64: x86/x86_64:
* *


+ 11
- 0
cblas.h View File

@@ -1,6 +1,11 @@
#ifndef CBLAS_H #ifndef CBLAS_H
#define CBLAS_H #define CBLAS_H


#ifdef __cplusplus
extern "C" {
/* Assume C declarations for C++ */
#endif /* __cplusplus */

#include <stddef.h> #include <stddef.h>
#include "common.h" #include "common.h"


@@ -273,4 +278,10 @@ void cblas_zher2k(enum CBLAS_ORDER Order, enum CBLAS_UPLO Uplo, enum CBLAS_TRANS
double *alpha, double *A, blasint lda, double *B, blasint ldb, double beta, double *C, blasint ldc); double *alpha, double *A, blasint lda, double *B, blasint ldb, double beta, double *C, blasint ldc);


void cblas_xerbla(blasint p, char *rout, char *form, ...); void cblas_xerbla(blasint p, char *rout, char *form, ...);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif #endif

+ 10
- 0
common.h View File

@@ -39,6 +39,11 @@
#ifndef COMMON_H #ifndef COMMON_H
#define COMMON_H #define COMMON_H


#ifdef __cplusplus
extern "C" {
/* Assume C declarations for C++ */
#endif /* __cplusplus */

#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
@@ -607,4 +612,9 @@ extern int gotoblas_profile;
#define PRINT_DEBUG_NAME if (readenv("GOTO_DEBUG")) fprintf(stderr, "GotoBLAS : %s\n", CHAR_NAME) #define PRINT_DEBUG_NAME if (readenv("GOTO_DEBUG")) fprintf(stderr, "GotoBLAS : %s\n", CHAR_NAME)
#endif #endif


#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif #endif

Loading…
Cancel
Save