{"id":13419755,"url":"https://github.com/arrayfire/arrayfire","last_synced_at":"2025-05-13T20:09:54.769Z","repository":{"id":22548805,"uuid":"25889802","full_name":"arrayfire/arrayfire","owner":"arrayfire","description":"ArrayFire: a general purpose GPU library.","archived":false,"fork":false,"pushed_at":"2025-05-07T16:58:16.000Z","size":19437,"stargazers_count":4692,"open_issues_count":296,"forks_count":543,"subscribers_count":148,"default_branch":"master","last_synced_at":"2025-05-07T17:47:56.264Z","etag":null,"topics":["arrayfire","c","c-plus-plus","cpp","cuda","gpgpu","gpu","hpc","opencl","performance","scientific-computing"],"latest_commit_sha":null,"homepage":"https://arrayfire.com","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/arrayfire.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2014-10-28T20:58:33.000Z","updated_at":"2025-05-07T17:23:25.000Z","dependencies_parsed_at":"2023-09-24T05:26:35.795Z","dependency_job_id":"2ba4b0fa-b8a4-46cb-b54e-46e5275e4610","html_url":"https://github.com/arrayfire/arrayfire","commit_stats":{"total_commits":5065,"total_committers":98,"mean_commits":"51.683673469387756","dds":0.7806515301085883,"last_synced_commit":"f4db00f2cc57272f16f0e7e8534f65c2a895cfda"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrayfire%2Farrayfire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrayfire%2Farrayfire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrayfire%2Farrayfire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrayfire%2Farrayfire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arrayfire","download_url":"https://codeload.github.com/arrayfire/arrayfire/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254020606,"owners_count":22000753,"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":["arrayfire","c","c-plus-plus","cpp","cuda","gpgpu","gpu","hpc","opencl","performance","scientific-computing"],"created_at":"2024-07-30T22:01:20.391Z","updated_at":"2025-05-13T20:09:54.735Z","avatar_url":"https://github.com/arrayfire.png","language":"C++","funding_links":[],"categories":["TODO scan for Android support in followings","Concurrency","C++","Table of Contents","Sensor Processing","Linear Algebra / Statistics Toolkit","Projects","GPU实用程序","其他_机器学习与深度学习","Uncategorized","Libraries","Math","scientific-computing","Optimizations","Graphics"],"sub_categories":["Tools and Development","Parallel Processing","General Purpose Tensor Library","HPC","Uncategorized","GPU Libraries","UI Test Automation Scripting"],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"http://arrayfire.com/\"\u003e\u003cimg src=\"http://arrayfire.com/logos/arrayfire_logo_whitebkgnd.png\" width=\"800\"\u003e\u003c/a\u003e\u003c/p\u003e\n\nArrayFire is a general-purpose tensor library that simplifies the software\ndevelopment process for the parallel architectures found in CPUs, GPUs, and\nother hardware acceleration devices. The library serves users in every\ntechnical computing market.\n\nSeveral of ArrayFire's benefits include:\n\n* Hundreds of accelerated [tensor computing\n  functions](https://arrayfire.org/docs/group__arrayfire__func.htm), in the\n  following areas:\n    * Array handling\n    * Computer vision\n    * Image processing\n    * Linear algebra\n    * Machine learning\n    * Standard math\n    * Signal Processing\n    * Statistics\n    * Vector algorithms\n* [Easy to use](http://arrayfire.org/docs/gettingstarted.htm), stable,\n  [well-documented](http://arrayfire.org/docs) API\n* Rigorous benchmarks and tests ensuring top performance and numerical accuracy\n* Cross-platform compatibility with support for CUDA, oneAPI, OpenCL, and\n  native CPU on Windows, Mac, and Linux\n* Built-in visualization functions through\n  [Forge](https://github.com/arrayfire/forge)\n* Commercially friendly open-source licensing\n* Enterprise support from [ArrayFire](http://arrayfire.com)\n\nArrayFire provides software developers with a high-level abstraction of data\nthat resides on the accelerator, the `af::array` object. Developers write code\nthat performs operations on ArrayFire arrays, which, in turn, are automatically\ntranslated into near-optimal kernels that execute on the computational device.\n\nArrayFire runs on devices ranging from low-power mobile phones to high-power\nGPU-enabled supercomputers. ArrayFire runs on CPUs from all major vendors\n(Intel, AMD, ARM), GPUs from the prominent manufacturers (AMD, Intel, NVIDIA,\nand Qualcomm), as well as a variety of other accelerator devices on Windows,\nMac, and Linux.\n\n# Getting ArrayFire\n\nInstructions to [install][32] or to build ArrayFire from source can be found on\nthe [wiki][1].\n\n### Conway's Game of Life Using ArrayFire\n\nVisit the [Wikipedia page][2] for a description of Conway's Game of Life.\n\n\u003cimg align=\"left\"\nsrc=\"https://github.com/arrayfire/assets/blob/master/gifs/conway.gif\"\nalt=\"Conway's Game of Life\" height=\"256\" width=\"256\"\u003e\n\n```cpp\nstatic const float h_kernel[] = { 1, 1, 1, 1, 0, 1, 1, 1, 1 };\nstatic const array kernel(3, 3, h_kernel, afHost);\n\narray state = (randu(128, 128, f32) \u003e 0.5).as(f32); // Init state\nWindow myWindow(256, 256);\nwhile(!myWindow.close()) {\n    array nHood = convolve(state, kernel); // Obtain neighbors\n    array C0 = (nHood == 2);  // Generate conditions for life\n    array C1 = (nHood == 3);\n    state = state * C0 + C1;  // Update state\n    myWindow.image(state);    // Display\n}\n```\nThe complete source code can be found [here][3].\n\n### Perceptron\n\n\u003cimg align=\"left\"\nsrc=\"https://github.com/arrayfire/assets/blob/imgs_readme_improv/gifs/perceptron.gif\"\nalt=\"Perceptron\" height=\"400\" width=\"300\"\u003e\n\n```cpp\narray predict(const array \u0026X, const array \u0026W) {\n    return sigmoid(matmul(X, W));\n}\n\narray train(const array \u0026X, const array \u0026Y,\n        double alpha = 0.1, double maxerr = 0.05,\n        int maxiter = 1000, bool verbose = false) {\n    array Weights = constant(0, X.dims(1), Y.dims(1));\n\n    for (int i = 0; i \u003c maxiter; i++) {\n        array P   = predict(X, Weights);\n        array err = Y - P;\n        if (mean\u003cfloat\u003e(abs(err) \u003c maxerr) break;\n        Weights += alpha * matmulTN(X, err);\n    }\n    return Weights;\n}\n...\n\narray Weights = train(train_feats, train_targets);\narray test_outputs  = predict(test_feats, Weights);\ndisplay_results\u003ctrue\u003e(test_images, test_outputs,\n                      test_targets, 20);\n```\n\nThe complete source code can be found [here][31].\n\nFor more code examples, visit the [`examples/`][4] directory.\n\n# Documentation\n\nYou can find the complete documentation [here](http://www.arrayfire.com/docs/index.htm).\n\nQuick links:\n\n* [List of functions](http://www.arrayfire.org/docs/group__arrayfire__func.htm)\n* [Tutorials](http://arrayfire.org/docs/tutorials.htm)\n* [Examples](http://www.arrayfire.org/docs/examples.htm)\n* [Blog](http://arrayfire.com/blog/)\n\n# Language support\n\nArrayFire has several official and community maintained language API's:\n\n[![C++][5]][6] [![Python][7]][8] [![Rust][9]][10] [![Julia][27]][28]\u003csub\u003e\u003cspan\u003e\u0026#8224;\u003c/span\u003e\u003c/sub\u003e\n[![Nim][29]][30]\u003csub\u003e\u003cspan\u003e\u0026#8224;\u003c/span\u003e\u003c/sub\u003e\n\n\u003csup\u003e\u003cspan\u003e\u0026#8224;\u003c/span\u003e\u003c/sup\u003e\u0026nbsp; Community maintained wrappers\n\n__In-Progress Wrappers__\n\n[![.NET][11]][12] [![Fortran][13]][14] [![Go][15]][16]\n[![Java][17]][18] [![Lua][19]][20] [![NodeJS][21]][22] [![R][23]][24] [![Ruby][25]][26]\n\n# Contributing\n\nThe community of ArrayFire developers invites you to build with us if you are\ninterested and able to write top-performing tensor functions. Together we can\nfulfill [The ArrayFire\nMission](https://github.com/arrayfire/arrayfire/wiki/The-ArrayFire-Mission-Statement)\nfor fast scientific computing for all.\n\nContributions of any kind are welcome! Please refer to [the\nwiki](https://github.com/arrayfire/arrayfire/wiki) and our [Code of\nConduct](33) to learn more about how you can get involved with the ArrayFire\nCommunity through\n[Sponsorship](https://github.com/arrayfire/arrayfire/wiki/Sponsorship),\n[Developer\nCommits](https://github.com/arrayfire/arrayfire/wiki/Contributing-Code-to-ArrayFire),\nor [Governance](https://github.com/arrayfire/arrayfire/wiki/Governance).\n\n# Citations and Acknowledgements\n\nIf you redistribute ArrayFire, please follow the terms established in [the\nlicense](LICENSE). If you wish to cite ArrayFire in an academic publication,\nplease use the following [citation document](.github/CITATION.md).\n\nArrayFire development is funded by AccelerEyes LLC and several third parties,\nplease see the list of [acknowledgements](ACKNOWLEDGEMENTS.md) for an\nexpression of our gratitude.\n\n# Support and Contact Info\n\n* [Slack Chat](https://join.slack.com/t/arrayfire-org/shared_invite/MjI4MjIzMDMzMTczLTE1MDI5ODg4NzYtN2QwNGE3ODA5OQ)\n* [Google Groups](https://groups.google.com/forum/#!forum/arrayfire-users)\n* ArrayFire Services:  [Consulting](http://arrayfire.com/consulting)  |  [Support](http://arrayfire.com/download)   |  [Training](http://arrayfire.com/training)\n\n# Trademark Policy\n\nThe literal mark \"ArrayFire\" and ArrayFire logos are trademarks of AccelerEyes\nLLC (dba ArrayFire). If you wish to use either of these marks in your own\nproject, please consult [ArrayFire's Trademark\nPolicy](http://arrayfire.com/trademark-policy/)\n\n[1]: https://github.com/arrayfire/arrayfire/wiki\n[2]: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life\n[3]: https://github.com/arrayfire/arrayfire/blob/master/examples/graphics/conway_pretty.cpp\n[4]: https://github.com/arrayfire/arrayfire/blob/master/examples/\n[5]: https://img.shields.io/badge/c++-%2300599C.svg?style=for-the-badge\u0026logo=c%2B%2B\u0026logoColor=white\n[6]: http://arrayfire.org/docs/gettingstarted.htm#gettingstarted_api_usage\n[7]: https://img.shields.io/badge/python-%2314354C.svg?style=for-the-badge\u0026logo=python\u0026logoColor=white\n[8]: https://github.com/arrayfire/arrayfire-python\n[9]: https://img.shields.io/badge/rust-%23000000.svg?style=for-the-badge\u0026logo=rust\u0026logoColor=white\n[10]: https://github.com/arrayfire/arrayfire-rust\n[11]: https://img.shields.io/badge/.NET-5C2D91?style=for-the-badge\u0026logo=.net\u0026logoColor=white\n[12]: https://github.com/arrayfire/arrayfire-dotnet\n[13]: https://img.shields.io/badge/F-Fortran-734f96?style=for-the-badge\n[14]: https://github.com/arrayfire/arrayfire-fortran\n[15]: https://img.shields.io/badge/go-%2300ADD8.svg?style=for-the-badge\u0026logo=go\u0026logoColor=white\n[16]: https://github.com/arrayfire/arrayfire-go\n[17]: https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge\u0026logo=java\u0026logoColor=white\n[18]: https://github.com/arrayfire/arrayfire-java\n[19]: https://img.shields.io/badge/lua-%232C2D72.svg?style=for-the-badge\u0026logo=lua\u0026logoColor=white\n[20]: https://github.com/arrayfire/arrayfire-lua\n[21]: https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge\u0026logo=javascript\u0026logoColor=%23F7DF1E\n[22]: https://github.com/arrayfire/arrayfire-js\n[23]: https://img.shields.io/badge/r-%23276DC3.svg?style=for-the-badge\u0026logo=r\u0026logoColor=white\n[24]: https://github.com/arrayfire/arrayfire-r\n[25]: https://img.shields.io/badge/ruby-%23CC342D.svg?style=for-the-badge\u0026logo=ruby\u0026logoColor=white\n[26]: https://github.com/arrayfire/arrayfire-rb\n[27]: https://img.shields.io/badge/j-Julia-cb3c33?style=for-the-badge\u0026labelColor=4063d8\n[28]: https://github.com/JuliaComputing/ArrayFire.jl\n[29]: https://img.shields.io/badge/n-Nim-000000?style=for-the-badge\u0026labelColor=efc743\n[30]: https://github.com/bitstormGER/ArrayFire-Nim\n[31]: https://github.com/arrayfire/arrayfire/blob/master/examples/machine_learning/perceptron.cpp\n[32]: https://github.com/arrayfire/arrayfire/wiki/Getting-ArrayFire\n[33]: https://github.com/arrayfire/arrayfire/wiki/Code-Of-Conduct\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farrayfire%2Farrayfire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farrayfire%2Farrayfire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farrayfire%2Farrayfire/lists"}