GithubHelp home page GithubHelp logo

guile-lapack's Introduction

Guile LAPACK bindings

This library binds some (not all, open to contributions!) of the LAPACK functions in Guile, using the LAPACKE C layer as the target. Most functions are thin wrappers over LAPACKE, with a potential for a higher-level interface (sometime later?)

Functions are added on an as needed basis (as used in Mgamma.) Contributions welcome!

Installation

Ensure that you have the modules/ directory in your GUILE_LOAD_PATH/%load-path and load it. You might need to adjust the directory paths in modules/lapack/lapack.scm to make LAPACKE .so-s discoverable.

Environment management is easier with Guix, that's why there's guix.scm. You can also install this repo as a Guix channel:

;; .config/guix/channels.scm
(cons*
 (channel
  (name 'guile-lapack)
  (url "https://github.com/aartaka/guile-lapack.git")
  (branch "master"))
  ...
  %default-channels)

Both guix.scm and the channel provide guile-lapack-git package with the fresh code.

Names & How to Use The Library

Most bindings follow the LAPACKE names, except that LAPACKE_ prefix is dropped.

Notice that this extremely succinct naming means that many symbols in the programs one writes may (but are unlikely to due to extremely unreadable names LAPACK uses) collide with the names provided by this library. Thus, use the provided modules with suitable prefixes instead of importing them raw:

(use-modules ((lapack lapack) #:prefix lapack:))

See the exported functions/constants list using Guile-native introspection facilities:

(use-modules ((lapack lapack) #:prefix lapack:))
,apropos lapack: 
;; (lapack lapack): lapack:+lower+
;; (lapack lapack): lapack:+row-major+
;; (lapack lapack): lapack:define-lapack
;; (lapack lapack): lapack:lapack-fn	#<procedure lapack-fn (name type args return)>
;; (lapack lapack): lapack:dsyev	#<procedure dsyev (layout jobz uplo n a lda w)>
;; (lapack lapack): lapack:+transpose+
;; (lapack lapack): lapack:dpotrs	#<procedure dpotrs (layout uplo n nrhs a lda b ldb)>
;; ...

guile-lapack's People

Contributors

aartaka avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.