problems with FFI including h files
Hal Daume III
hdaume@ISI.EDU
Fri, 31 May 2002 14:15:01 -0700 (PDT)
Well, I'm not sure exactly how to do this -- i can dump hspp and hc files
from the haskell source, but I don't think from the h. *HOWEVER*, i
modified cblas.h on line 444 because of your guess and found out that the
problem wasn't with the beta, but with float *C. If I changed "C" to
"bC", as in:
void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE
TransA,
const enum CBLAS_TRANSPOSE TransB, const int M, const int
N,
const int K, const float alpha, const float *A,
const int lda, const float *B, const int ldb,
const float beta, float *bC, const int ldc);
everything works (well, at least i no longer get an error on *that* line
-- the other errors are still there).
So it looks like you were right. How can I get ghc to *not* do this? :)
--
Hal Daume III
"Computer science is no more about computers | hdaume@isi.edu
than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
On Fri, 31 May 2002, Sven Moritz Hallberg wrote:
> On Friday 31. May 2002 22:47, Hal Daume III wrote:
> > [...]
> > /nfs/isd/hdaume/download/ATLAS/include/cblas.h:591: parse error before
> > numeric constant
> >
> >
> > if I look at cblas.h, line 444 is the last line of this definition:
> >
> > void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE
> > TransA,
> > const enum CBLAS_TRANSPOSE TransB, const int M, const int
> > N,
> > const int K, const float alpha, const float *A,
> > const int lda, const float *B, const int ldb,
> > const float beta, float *C, const int ldc);
>
> Just a guess, GHC somewhere #define's beta to a numeric constant? Can you tell
> GHC to dump the preprocessed C code and see what the line in question
> becomes?
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>