{"id":13809697,"url":"https://github.com/elftausend/custos-math","last_synced_at":"2025-04-11T03:52:42.763Z","repository":{"id":41164405,"uuid":"475112858","full_name":"elftausend/custos-math","owner":"elftausend","description":"Matrix implementation using custos","archived":false,"fork":false,"pushed_at":"2024-02-07T11:17:40.000Z","size":503,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T03:52:37.282Z","etag":null,"topics":["custos","math","matrix","neural-network","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/elftausend.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}},"created_at":"2022-03-28T17:40:07.000Z","updated_at":"2024-12-28T21:42:04.000Z","dependencies_parsed_at":"2024-06-10T04:01:33.326Z","dependency_job_id":null,"html_url":"https://github.com/elftausend/custos-math","commit_stats":{"total_commits":188,"total_committers":3,"mean_commits":"62.666666666666664","dds":0.3085106382978723,"last_synced_commit":"7103352be7334153166c40879858f814f1cae799"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elftausend%2Fcustos-math","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elftausend%2Fcustos-math/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elftausend%2Fcustos-math/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elftausend%2Fcustos-math/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elftausend","download_url":"https://codeload.github.com/elftausend/custos-math/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339261,"owners_count":21087214,"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","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":["custos","math","matrix","neural-network","rust"],"created_at":"2024-08-04T02:00:34.559Z","updated_at":"2025-04-11T03:52:42.744Z","avatar_url":"https://github.com/elftausend.png","language":"Rust","readme":"# custos-math\n\n[![Crates.io version](https://img.shields.io/crates/v/custos-math.svg)](https://crates.io/crates/custos-math)\n[![Docs](https://docs.rs/custos-math/badge.svg?version=0.6.3)](https://docs.rs/custos-math/0.6.3/custos-math/)\n\nThis crate provides CUDA, OpenCL, CPU (and Stack) based matrix operations using [custos].\n\n[custos]: https://github.com/elftausend/custos\n\n## Installation\n\nAdd \"custos-math\" as a dependency:\nYou will also need [custos], if you want to run an example.\n```toml\n[dependencies]\ncustos-math = \"0.6.3\"\n\n# to disable the default features (cuda, opencl) and use an own set of features:\n#custos-math = { version=\"0.6.3\", default-features = false, features=[\"opencl\"]}\n```\n\n`custos-math` supports no-std via the `no-std` feature. This activates the \"stack\" feature, providing a `Stack` device.\n\n[custos] is accessible via custos_math::custos::{..}\n\n## Example\n\n```rust\nuse custos_math::{Matrix, custos::CPU};\n\nfn main() {\n    let device = CPU::new();\n\n    let a = Matrix::from((\u0026device, (2, 3), [1., 2., 3., 4., 5., 6.,]));\n    let b = Matrix::from((\u0026device, (3, 2), [6., 5., 4., 3., 2., 1.,]));\n\n    let c = a.gemm(\u0026b);\n\n    assert_eq!(c.read(), vec![20., 14., 56., 41.,]);\n}\n```\n\nMany more examples can be found in the tests and examples folder.","funding_links":[],"categories":["Frameworks","Scientific Computation"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felftausend%2Fcustos-math","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felftausend%2Fcustos-math","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felftausend%2Fcustos-math/lists"}