Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use fused types and BLAS Fortran ABI
- Loading branch information
Showing
8 changed files
with
110 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
HookFile: bscript | ||
|
||
Library: | ||
Extension: _hierarchy_wrap | ||
Sources: | ||
src/hierarchy_wrap.c, src/hierarchy.c | ||
Extension: _vq | ||
Sources: | ||
src/vq_module.c, src/vq.c | ||
_vq.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from bento.commands import hooks | ||
|
||
@hooks.pre_build | ||
def pre_build(context): | ||
context.tweak_extension("_vq", | ||
use="LAPACK CLIB") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Handle different Fortran conventions. | ||
*/ | ||
|
||
#if defined(NO_APPEND_FORTRAN) | ||
#if defined(UPPERCASE_FORTRAN) | ||
#define F_FUNC(f,F) F | ||
#else | ||
#define F_FUNC(f,F) f | ||
#endif | ||
#else | ||
#if defined(UPPERCASE_FORTRAN) | ||
#define F_FUNC(f,F) F##_ | ||
#else | ||
#define F_FUNC(f,F) f##_ | ||
#endif | ||
#endif | ||
|
||
#define f_sgemm F_FUNC(sgemm,SGEMM) | ||
#define f_dgemm F_FUNC(dgemm,DGEMM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cdef extern from "cluster_blas.h": | ||
|
||
void f_sgemm(char *transA, char *transB, int *m, int *n, int *k, | ||
float *alpha, float *A, int *lda, float *B, int *ldb, | ||
float *beta, float *C, int *ldc) nogil | ||
|
||
void f_dgemm(char *transA, char *transB, int *m, int *n, int *k, | ||
double *alpha, double *A, int *lda, double *B, int *ldb, | ||
double *beta, double *C, int *ldc) nogil | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.