{"id":18509187,"url":"https://github.com/rindow/rindow-matlib","last_synced_at":"2026-02-27T11:01:58.583Z","repository":{"id":228141162,"uuid":"773212621","full_name":"rindow/rindow-matlib","owner":"rindow","description":"The Rindow Matrix library for C","archived":false,"fork":false,"pushed_at":"2025-04-13T12:02:52.000Z","size":214,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T06:45:08.972Z","etag":null,"topics":["acceleration","array","clang","machine-learning","mathematics","openmp","scientific-computing"],"latest_commit_sha":null,"homepage":"https://rindow.github.io/mathematics/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rindow.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-17T03:18:19.000Z","updated_at":"2025-04-13T11:34:26.000Z","dependencies_parsed_at":"2024-03-17T08:48:01.542Z","dependency_job_id":"d21c9b53-68ab-49fc-beff-e376242b0d87","html_url":"https://github.com/rindow/rindow-matlib","commit_stats":null,"previous_names":["rindow/rindow-matlib"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rindow/rindow-matlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rindow%2Frindow-matlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rindow%2Frindow-matlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rindow%2Frindow-matlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rindow%2Frindow-matlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rindow","download_url":"https://codeload.github.com/rindow/rindow-matlib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rindow%2Frindow-matlib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29892063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T09:48:51.284Z","status":"ssl_error","status_checked_at":"2026-02-27T09:48:43.992Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["acceleration","array","clang","machine-learning","mathematics","openmp","scientific-computing"],"created_at":"2024-11-06T15:16:44.336Z","updated_at":"2026-02-27T11:01:58.558Z","avatar_url":"https://github.com/rindow.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"The Rindow Matrix library for C\n===============================\nRindow Math Matrix is the fundamental package for scientific matrix operation\n\n- A powerful N-dimensional array object\n- Sophisticated (broadcasting) functions\n- A high-speed calculation library written in C/C++.\n- Useful linear algebra and random number capabilities\n- Parallel calculation with native multi-threading or OpenMP\n\nYou can call a high-speed calculation library written in C language to speed up matrix calculation processing.\nRindow Matlib includes many matrix operations functions used in machine learning.\n\nPlease see the documents about rindow mathematics \non [Rindow Mathematics](https://rindow.github.io/mathematics/openblas/mathlibrary.html) web pages.\n\nRequirements\n============\n\n- Windows(10/11) , Linux(Ubuntu 22.04-, Debian 12-), MacOS(13/14) or later\n\nHow to setup pre-build binaries\n===============================\n\n### How to setup for Windows\n\nDownload the pre-build binary file.\n\n- https://github.com/rindow/rindow-matlib/releases\n\nUnzip the file for Windows and copy rindowmatlib.dll to the directory set in PATH.\n\nThe standard DLLs in the Bin directory is the thread version. Subdirectories contain OpenMP and Serial versions.\n\n```shell\nC\u003e PATH %PATH%;C:\\path\\to\\bin\n```\n\n### How to setup for Linux\n\nDownload the pre-build binary file.\n\n- https://github.com/rindow/rindow-matlib/releases\n\nPlease install using the apt command. \n```shell\n$ sudo apt install ./rindow-matlib_X.X.X_amd64.deb\n```\n\n### How to setup for macOS\n\nDownload the pre-build binary file.\n\n- https://github.com/rindow/rindow-matlib/releases\n\nExtract the tar.gz file to the tmp directory and navigate to the directory.\n\n```shell\n$ tar -xzf rindow-matlib-X.X.X-Darwin-XXX.tar.gz -C /tmp\n$ cd /tmp/rindow-matlib-X.X.X-Darwin-XXX\n```\n\nThe standard dylib in the Lib directory is the thread version. Subdirectories contain OpenMP and Serial versions.\n\nNext, copy the include and lib directories to /usr/local.\n\n```shell\n$ sudo cp -r usr/include /usr/local/\n$ sudo cp -r usr/lib /usr/local/\n```\nIf you want to use OpenMP Please type `brew install libomp`\n\n### Troubleshooting for Linux\nSince rindow-matlib currently uses ptheads, so you should choose the pthread version for OpenBLAS as well.\nIn version 1.0 of Rindow-matlib we recommended the OpenMP version, but now we have changed our policy and are recommending the pthread version.\n\nUsing the OpenMP version of OpenBLAS can cause conflicts and become unstable and slow.\nThis issue does not occur on Windows.\n\nIf you have already installed the OpenMP version of OpenBLAS, you can delete it and install pthread version.\n```shell\n$ sudo apt install libopenblas0-pthread liblapacke\n$ sudo apt remove libopenblas0-openmp\n```\n\nBut if you can't remove it, you can switch to it using the update-alternatives command.\n\n```shell\n$ sudo update-alternatives --config libopenblas.so.0-x86_64-linux-gnu\n$ sudo update-alternatives --config liblapack.so.3-x86_64-linux-gnu\n```\n\nBut, If you really want to use the OpenMP version of OpenBLAS, please switch to the OpenMP version of rindow-matlib.\n\n```shell\n$ sudo update-alternatives --config librindowmatlib.so\nThere are 1 choices for the alternative librindowmatlib.so (providing /usr/lib/librindowmatlib.so).\n\n  Selection    Path                                             Priority   Status\n------------------------------------------------------------\n* 0            /usr/lib/rindowmatlib-thread/librindowmatlib.so   100       auto mode\n  1            /usr/lib/rindowmatlib-openmp/librindowmatlib.so   95        manual mode\n  2            /usr/lib/rindowmatlib-serial/librindowmatlib.so   90        manual mode\n  3            /usr/lib/rindowmatlib-thread/librindowmatlib.so   100       manual mode\n\nPress \u003center\u003e to keep the current choice[*], or type selection number: 1\n```\nChoose the \"rindowmatlib-serial\".\n\nHow to build from source code on Windows\n========================================\nYou can also build and use from source code.\n\n### Download source code\n\nDownload source code from release and unzip\n\n- https://github.com/rindow/rindow-matlib/releases\n\n### Build and Install on Windows\n\nBuild with Visual Studio.\n\n```shell\nC\u003e cd \\path\\to\\here\nC\u003e cmake -S . -B build\nC\u003e cmake --build build --config Release\nC\u003e cd build\nC\u003e ctest -C Release\nC\u003e cpack -C Release\nC\u003e cd ..\\packages\n```\n\nUnzip the package file from packages directory.\n\n```shell\nC\u003e PATH %PATH%;C:\\path\\to\\bin\n```\n\nHow to build from source code on Linux\n=======================================\nYou can also build and use from source code.\n\n### Download source code\n\nDownload source code from release and extract\n\n- https://github.com/rindow/rindow-matlib/releases\n\n### Build and Install on Linux\n\nBuild with cmake.\n\n```shell\n$ sudo apt install build-essential cmake\n$ cd \\path\\to\\here\n$ cmake -S . -B build\n$ cmake --build build --config Release\n$ (cd build; ctest -C Release)\n$ (cd build; cpack -C Release)\n```\n\nInstall with apt command.\n\n```shell\n$ sudo apt install ./packages/rindow-matlib_X.X.X_amd64.deb\n```\n\nHow to build from source code on MacOS\n=======================================\n\nYou can also build and use from source code.\n\n### Download source code\n\nDownload source code from release and extract\n\n- https://github.com/rindow/rindow-matlib/releases\n\n### Build and Install on MacOS\n\nInstall openmp library with brew before build with cmake.\n\n```shell\n$ brew install libomp\n$ cd \\path\\to\\here\n$ cmake -S . -B build\n$ cmake --build build --config Release\n$ (cd build; ctest -C Release)\n$ (cd build; cpack -C Release)\n```\n\nHow to use\n==========\n\n### sample program\n\n```cpp\n#include \u003ciostream\u003e\n#include \u003cstring\u003e\n#include \u003ciomanip\u003e\n#include \u003crindow/matlib.h\u003e\n\nvoid printMatrix(int m, int n, void *matrix)\n{\n    float *v = (float *)matrix;\n    for(int i=0; i\u003cm; i++) {\n        for(int j=0; j\u003cn; j++) {\n            std::cout \u003c\u003c std::setw(4) \u003c\u003c v[i*n+j] \u003c\u003c \",\";\n        }\n        std::cout \u003c\u003c std::endl;\n    }\n}\nint main(int ac, char **av)\n{\n    const int M = 2;\n    const int N = 3;\n    // float\n    float sX[N] = {1, 2, 3};\n    float sY[M][N] = {{1,10,100}, {-1,-10,-100}};\n    float alpha = 2.0;\n    std::cout \u003c\u003c \"X:\" \u003c\u003c std::endl;\n    printMatrix(1, N, sX);\n    std::cout \u003c\u003c std::endl \u003c\u003c \"Y:\" \u003c\u003c std::endl;\n    printMatrix(M, N, sY);\n    std::cout \u003c\u003c std::endl \u003c\u003c \"alpha:\" \u003c\u003c std::endl;\n    std::cout \u003c\u003c std::setw(4) \u003c\u003c alpha \u003c\u003c std::endl;\n    rindow_matlib_s_add(\n        RINDOW_MATLIB_NO_TRANS, // int32_t trans,\n        M,      // int32_t m,\n        N,      // int32_t n,\n        alpha,    // float alpha,\n        (float *)\u0026sX,     // float *x,\n        1,      // int32_t incX,\n        (float *)\u0026sY,     // float *a,\n        N       // int32_t ldA\n    );\n    std::cout \u003c\u003c std::endl \u003c\u003c \"Results:\" \u003c\u003c std::endl;\n    printMatrix(M, N, sY);\n\n    std::string mode;\n    switch(rindow_matlib_common_get_parallel()) {\n        case RINDOW_MATLIB_SEQUENTIAL: {\n            mode = \"SEQUENTIAL\";\n            break;\n        }\n        case RINDOW_MATLIB_THREAD: {\n            mode = \"THREAD\";\n            break;\n        }\n        case RINDOW_MATLIB_OPENMP: {\n            mode = \"OPENMP\";\n            break;\n        } default: {\n            mode = \"UNKOWN\";\n            break;\n        }\n    }\n    std::cout \u003c\u003c mode  \u003c\u003c std::endl;\n    return 0;\n}\n```\n\n### Build the sample program on Windows.\n\n```shell\nC\u003e cl /EHsc -I.\\path\\to\\include sample.cpp \\path\\to\\lib\\rindowmatlib.lib\n```\n\n### Build the sample program on Linux.\n\n```shell\n$ g++ sample.cpp -lrindowmatlib -lm\n```\n\n### Build the sample program on MacOS.\n\n```shell\n$ c++ sample.cpp -lrindowmatlib -lm\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frindow%2Frindow-matlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frindow%2Frindow-matlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frindow%2Frindow-matlib/lists"}