Skip to content

Commit

Permalink
cblas: add func prototype for cblas_(s|d)syrk
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin committed Sep 8, 2017
1 parent 10ad90b commit 5e47361
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion deps/cblas.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define CBLAS_H

/*
* This file modified from the OpenBLAS repository,
* This file modified from the OpenBLAS repository.
*/

#include <stddef.h>
Expand Down Expand Up @@ -52,6 +52,8 @@ typedef int blasint;
#define cblas_dtrmm cblas_dtrmm64_
#define cblas_strsm cblas_strsm64_
#define cblas_dtrsm cblas_dtrsm64_
#define cblas_ssyrk cblas_ssyrk64_
#define cblas_dsyrk cblas_dsyrk64_
#endif


Expand Down Expand Up @@ -85,6 +87,11 @@ void cblas_strsm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLA
void cblas_dtrsm(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_SIDE Side, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE TransA,
OPENBLAS_CONST enum CBLAS_DIAG Diag, OPENBLAS_CONST blasint M, OPENBLAS_CONST blasint N, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, double *B, OPENBLAS_CONST blasint ldb);

void cblas_ssyrk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);
void cblas_dsyrk(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST double beta, double *C, OPENBLAS_CONST blasint ldc);

#ifdef __cplusplus
}
#endif /* __cplusplus */
Expand Down

5 comments on commit 5e47361

@mseeger
Copy link

@mseeger mseeger commented on 5e47361 Sep 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should say I do not like this.
Why is cblas.h edited in the first place?
Next time we need another blas function, you will have to do this again.

@iblislin
Copy link
Member Author

@iblislin iblislin commented on 5e47361 Sep 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that we need to deal with ILP64 version of OpenBLAS: 60c16e2#diff-25b563300be5d18000d9318e43c59e36

See also:

Maybe I should include all the cblas function in this PR, just a tedious work to get all C macros.

@vchuravy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alternative is to stop building agains Julia's openblas and build it ourself...

@pluskid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is a bit hacky. But for now, I think building against Julia's openblas is still a bit easier for end user than installing openblas. Maybe we can try to persuade the Julia release to include a header file for their openblas?

@vchuravy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Julia has decided against including headers for their dependencies, but hopefully the next generation of BinDeps will address this.

Please sign in to comment.