Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBLAS.BLAS.FFI types #23

Open
mxswd opened this issue May 4, 2014 · 2 comments
Open

HBLAS.BLAS.FFI types #23

mxswd opened this issue May 4, 2014 · 2 comments

Comments

@mxswd
Copy link

mxswd commented May 4, 2014

The types of the functions (i.e. cblas_sdot_unsafe) are Float and Double, when they are really CFloat and CDouble.

Also cblas_isamax_unsafe / cblas_idamax_unsafe is returning a CInt, when really it returns a CUInt.

Also, cblas_idamax_unsafe's 2nd argument takes a Float, when it should take a Double?

@cartazio
Copy link
Member

cartazio commented May 4, 2014

is there any difference between CFloat vs Float and CDouble vs Double for the purposes of FFI? AFAIK, the C* versions of float and double are just newtype wrappers and then the ghc ffi work treats them as Float and Double? (i could be totally wrong here, so please correct me if i'm wrong.)

Good catch #define CBLAS_INDEX size_t seems to the the right defn, so it should be CSize right?

you're right, i'll check that shortly.

@mxswd
Copy link
Author

mxswd commented May 5, 2014

Yeah, leave the Floats and Doubles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants