{"id":13830854,"url":"https://github.com/MuGdxy/muda","last_synced_at":"2025-07-09T12:34:16.344Z","repository":{"id":64950919,"uuid":"579659394","full_name":"MuGdxy/muda","owner":"MuGdxy","description":"μ-Cuda, COVER THE LAST MILE OF CUDA. With features: intellisense-friendly, structured launch, automatic cuda graph generation and updating.","archived":false,"fork":false,"pushed_at":"2024-05-11T14:08:15.000Z","size":7415,"stargazers_count":118,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"mini","last_synced_at":"2024-05-11T15:25:38.054Z","etag":null,"topics":["cuda","cuda-cpp","cuda-programming"],"latest_commit_sha":null,"homepage":"https://mugdxy.github.io/muda-doc/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MuGdxy.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-12-18T12:56:03.000Z","updated_at":"2024-05-30T04:24:46.735Z","dependencies_parsed_at":"2024-05-30T04:24:46.353Z","dependency_job_id":"04d9f883-d3e9-490e-90a2-e1f443f11f90","html_url":"https://github.com/MuGdxy/muda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuGdxy%2Fmuda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuGdxy%2Fmuda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuGdxy%2Fmuda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuGdxy%2Fmuda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MuGdxy","download_url":"https://codeload.github.com/MuGdxy/muda/tar.gz/refs/heads/mini","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225553257,"owners_count":17487293,"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":["cuda","cuda-cpp","cuda-programming"],"created_at":"2024-08-04T10:01:10.483Z","updated_at":"2024-11-20T12:30:33.127Z","avatar_url":"https://github.com/MuGdxy.png","language":"C++","funding_links":[],"categories":["C++","GPU"],"sub_categories":[],"readme":"[TOC]\n\n# MUDA\n\nMUDA is **μ-CUDA**, yet another painless CUDA programming **paradigm**.\n\n\u003e COVER THE LAST MILE OF CUDA\n\n## Quick Overview\n\n**Detailed Introduction And Overview [Highly Recommend]**  :arrow_right: https://mugdxy.github.io/muda-doc/ \n\n```c++\n#include \u003cmuda/muda.h\u003e\n#include \u003cmuda/logger.h\u003e\n#include \u003ciostream\u003e\nusing namespace muda;\n\nint main()\n{\n    constexpr int N = 8;\n    \n    // resizable buffer\n    DeviceBuffer\u003cint\u003e buffer;\n    buffer.resize(N);\n    buffer.fill(1);\n    \n    // std::cout like logger\n    Logger logger;\n    \n    // parallel for loop\n    ParallelFor()\n        .kernel_name(\"hello_muda\") \n        .apply(N,\n      \t[\n            buffer = buffer.viewer().name(\"buffer\"),\n            logger = logger.viewer()\n        ] __device__(int i) \n        {\n            logger \u003c\u003c \"buffer(\" \u003c\u003c i \u003c\u003c \")=\" \u003c\u003c buffer(i) \u003c\u003c \"\\n\";\n        });\n    \n    logger.retrieve(std::cout); // show print on std::cout\n}\n```\n\n## Build\n\n### Xmake\n\nRun example:\n\n```shell\n$ xmake f --example=true\n$ xmake \n$ xmake run muda_example hello_muda\n```\nTo show all examples:\n\n```shell\n$ xmake run muda_example -l\n```\nPlay all examples:\n\n```shell\n$ xmake run muda_example\n```\n### Cmake\n\n```shell\n$ mkdir CMakeBuild\n$ cd CMakeBuild\n$ cmake -S ..\n$ cmake --build .\n```\n\n### Copy Headers\n\nBecause **muda** is header-only, copy the `src/muda/` folder to your project, set the include directory, and everything is done.\n\n### Macro\n\n| Macro                     | Value               | Details                                                      |\n| ------------------------- | ------------------- | ------------------------------------------------------------ |\n| `MUDA_CHECK_ON`           | `1`(default) or `0` | `MUDA_CHECK_ON=1` for turn on all muda runtime check(for safety) |\n| `MUDA_WITH_COMPUTE_GRAPH` | `1`or`0`(default)   | `MUDA_WITH_COMPUTE_GRAPH=1` for turn on muda compute graph feature |\n\nIf you manually copy the header files, don't forget to define the macros yourself. If you use cmake or xmake, just set the project dependency to muda.\n\n## Tutorial\n\n- [tutorial_zh](https://zhuanlan.zhihu.com/p/659664377)\n- If you need an English version tutorial, please get in touch with me or post an issue to let me know.\n\n## Documentation\n\nDocumentation is maintained on https://mugdxy.github.io/muda-doc/. And you can also build the doc by yourself. \n\n## Examples\n\n- [examples](./example/)\n\nAll examples in `muda/example` are self-explanatory,  enjoy it.\n\n![image-20231102030703199](/docs/img/example-img.png)\n\n## Contributing\n\nContributions are welcome. We are looking for or are working on:\n\n1. **muda** development\n\n2. fancy simulation demos using **muda**\n\n3. better documentation of **muda**\n\n## Related Work\n\n- Topological braiding simulation using **muda** (old version)\n\n  ```latex\n  @article{article,\n  author = {Lu, Xinyu and Bo, Pengbo and Wang, Linqin},\n  year = {2023},\n  month = {07},\n  pages = {},\n  title = {Real-Time 3D Topological Braiding Simulation with Penetration-Free Guarantee},\n  volume = {164},\n  journal = {Computer-Aided Design},\n  doi = {10.1016/j.cad.2023.103594}\n  }\n  ```\n\n  ![braiding](/docs/img/braiding.png)\n\n- [solid-sim-muda](https://github.com/Roushelfy/solid-sim-muda): a tiny solid simulator using muda.\n  \n  \n  \n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMuGdxy%2Fmuda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMuGdxy%2Fmuda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMuGdxy%2Fmuda/lists"}