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

Improve way of implementing blas_sys #13

Closed
gustav1101 opened this issue Jan 27, 2017 · 5 comments
Closed

Improve way of implementing blas_sys #13

gustav1101 opened this issue Jan 27, 2017 · 5 comments

Comments

@gustav1101
Copy link
Collaborator

As of now we can work with blas_sys (yay!) but we need to install a c-compiler and gfortran before we do that (boho:( ). So It would be good if someone could work a way around that or at least put the necessary stuff into a script so that installation works automated.

@jonas-schievink
Copy link
Collaborator

Depending on which features you need for this project, a simpler crate for linear algebra might do the trick. There's a number of crates implemented in pure Rust, so no C compiler is needed: cgmath, nalgebra and rulinalg, to name a few.

@toschneider
Copy link
Collaborator

toschneider commented Jan 27, 2017

Blas seems to be the only crate fast enough for the amount of matrix multiplication we'll have

@jonas-schievink
Copy link
Collaborator

Please don't waste time prematurely optimizing unwritten and unbenchmarked code. I'm frequently making that mistake, and it costs hours (if not days) of work each time.

If you really have to use BLAS, please consider using the blas crate instead of blas-sys. blas-sys is only an FFI binding to the C library (CBLAS), which means that all functions use raw pointers and are unsafe - two topics that weren't yet convered in the lecture (AFAIK). blas still uses the (apparently) well-known BLAS functions, but exposes a typesafe interface that should be much simpler to use.

@gustav1101
Copy link
Collaborator Author

Looks like blas has blas-sys as dependency and probably uses the same unsafe methoda that blas-sys has, but with rust data types and maybe some input sanitising. I'd say let's use that then.

@vab9
Copy link
Owner

vab9 commented Feb 7, 2017

Da wir uns ja jetzt anscheinend auf nalgebra geeinigt haben, schliesse ich des hier mal...

@vab9 vab9 closed this as completed Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants