{"id":21159173,"url":"https://github.com/rufflewind/blas-shim","last_synced_at":"2025-08-14T04:09:39.226Z","repository":{"id":17269992,"uuid":"20039696","full_name":"Rufflewind/blas-shim","owner":"Rufflewind","description":"Wrapper generator for the Fortran BLAS interface.","archived":false,"fork":false,"pushed_at":"2015-01-15T06:46:11.000Z","size":192,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T15:49:23.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rufflewind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-21T22:33:44.000Z","updated_at":"2019-10-24T15:09:17.000Z","dependencies_parsed_at":"2022-09-13T01:01:02.684Z","dependency_job_id":null,"html_url":"https://github.com/Rufflewind/blas-shim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rufflewind/blas-shim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Fblas-shim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Fblas-shim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Fblas-shim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Fblas-shim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rufflewind","download_url":"https://codeload.github.com/Rufflewind/blas-shim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rufflewind%2Fblas-shim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270359398,"owners_count":24570477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T12:59:47.669Z","updated_at":"2025-08-14T04:09:39.188Z","avatar_url":"https://github.com/Rufflewind.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"BLAS Shim\n=========\n\nThis is a small library that wraps an existing Fortran interface of BLAS.\n\nNote: This is an *incomplete work*, as most of the BLAS functions are still\nmissing.  However, it is trivial to add additional BLAS functions as the\ninfrastructure for automatic generation is quite complete: one can simply add\nmore functions to the `blasFuns` variable in `Blas.hs`.\n\nBuilding\n--------\n\nThe makefile will automate pretty much everything and generate the wrapper\nlibraries (both static and shared).  Be sure to set the correct linker flags\nfor your BLAS implementation by overriding the `LBLAS` variable in the makefile.\n\nThe wrapper generator is written in Haskell and, when executed, creates two\nfiles:\n\n- `blas.h`: This header file is to be included and supplies the declarations\n  of the normalized interface.\n\n- `blas.c`: This is the implementation of the wrapper.\n\nThere is an additional supplementary header, `complex_typedefs.h`, which\nprovides type aliases for the complex number type.  It uses the standard\ncomplex number types if possible, falling back to a simple struct if it's not\nsupported (e.g. in C90).\n\nDependencies\n------------\n\n  - [Haskell][3] environment\n  - [ListLike][4]\n  - C compiler and associated build tools\n  - BLAS implementation\n\nMotivation\n----------\n\nBLAS implementations generally provide two kinds of interfaces: one for C and\none for Fortran.  The C interface is much more portable than the Fortran\ninterface due to lack of a standard Fortran calling convention, but the C\ninterface is not nearly as ubiquitous.  There are a few ways to overcome this:\n\n- One can build the official [CBLAS][1] interface wrapper ([download][2]).\n  This is the most straightforward approach but the interfaces .\n\n- Alternatively, one can call the Fortran functions directly.  One must then\n  account for the differences in the Fortran calling convention, which can\n  vary depending on the Fortran compiler.  The goal of this library is to\n  *automatically generate* a wrapper so as to normalize these differences.\n\nInterface\n---------\n\nThe function signatures in the normalized interface are exactly what one'd\nexpect if each type was translated literally.  The parameters are no longer\npassed as pointers (which is very awkward to use) as they would be if the\nFortran interface was used directly.  Of course, the array arguments are still\npassed as pointers for obvious reasons.\n\nTo avoid conflicts with existing BLAS implementations, the normalized\nfunctions are named with a prefix `bls_`.\n\n[1]: http://netlib.org/blas/blast-forum/cinterface.pdf\n[2]: http://netlib.org/blas/blast-forum/cblas.tgz\n[3]: http://haskell.org\n[4]: https://hackage.haskell.org/package/ListLike\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frufflewind%2Fblas-shim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frufflewind%2Fblas-shim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frufflewind%2Fblas-shim/lists"}