{"id":13418804,"url":"https://github.com/HSA-Libraries/Bolt","last_synced_at":"2025-03-15T04:30:44.401Z","repository":{"id":5084772,"uuid":"6247061","full_name":"HSA-Libraries/Bolt","owner":"HSA-Libraries","description":"Bolt is a C++ template library optimized for GPUs. Bolt provides high-performance library implementations for common algorithms such as scan, reduce, transform, and sort.","archived":false,"fork":false,"pushed_at":"2016-02-11T23:23:44.000Z","size":42875,"stargazers_count":373,"open_issues_count":24,"forks_count":65,"subscribers_count":52,"default_branch":"master","last_synced_at":"2024-07-31T22:44:05.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jheusser/hawkes","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HSA-Libraries.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-16T15:56:22.000Z","updated_at":"2024-07-11T09:31:44.000Z","dependencies_parsed_at":"2022-09-02T01:11:01.326Z","dependency_job_id":null,"html_url":"https://github.com/HSA-Libraries/Bolt","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HSA-Libraries%2FBolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HSA-Libraries%2FBolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HSA-Libraries%2FBolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HSA-Libraries%2FBolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HSA-Libraries","download_url":"https://codeload.github.com/HSA-Libraries/Bolt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243685505,"owners_count":20330980,"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":[],"created_at":"2024-07-30T22:01:07.333Z","updated_at":"2025-03-15T04:30:44.395Z","avatar_url":"https://github.com/HSA-Libraries.png","language":"C++","readme":"Bolt is a C++ template library optimized for heterogeneous computing. Bolt is designed to provide high-performance library implementations for common algorithms such as scan, reduce, transform, and sort. The Bolt interface was modeled on the C++ Standard Template Library (STL). Developers familiar with the STL will recognize many of the Bolt APIs and customization techniques.\n\nThe primary goal of Bolt is to make it easier for developers to utilize the inherent performance and power efficiency benefits of heterogeneous computing.  It has interfaces that are easy to use, and has comprehensive documentation for the library routines, memory management, control interfaces, and host/device code sharing.\n\nCompared to writing the equivalent functionality in OpenCL™, you’ll find that Bolt requires significantly fewer lines-of-code and less developer effort.  Bolt is designed to provide a standard way to develop an application that can execute on either a regular CPU, or use any available OpenCL™ capable accelerated compute unit, with a single code path.\n\nHere's a link to our \u003ca href=\"https://github.com/HSA-Libraries/bolt/wiki\"\u003eBOLT wiki page\u003c/a\u003e.\n \n## Prerequisites\n\n### Windows\n\n1. Visual Studio 2010 onwards (VS2012 for C++ AMP)\n2. Tested with 32/64 bit Windows® 7/8 and Windows® Blue\n3. CMake 2.8.10\n4. TBB (For Multicore CPU path only) (4.1 Update 1 or Above) . See Building Bolt with TBB.\n5. APP SDK 2.8 or onwards.\n\n*Note:* If the user has installed both Visual Studio 2012 and Visual Studio 2010, the latter should be updated to SP1.\n\n### Linux\n\n1. GCC 4.6.3 and above\n2. Tested with OpenSuse 12.3, RHEL 6.4 64bit, RHEL 6.3 32bit, Ubuntu 13.4\n3. CMake 2.8.10\n4. TBB (For Multicore CPU path only) (4.1 Update 1 or Above) . See Building Bolt with TBB.\n5. APP SDK 2.8 or onwards.\n\n*Note:* Bolt pre-built binaries for Linux are build with GCC 4.7.3, same version should be used for Application building else user has to build Bolt from source with GCC 4.6.3 or higher.\n\n### Catalyst™ package\n\nThe latest Catalyst driver contains the most recent OpenCL runtime. Recommended Catalyst package is latest 13.11 Beta Driver.\n\n13.4 and higher is supported.\n\n*Note:* 13.9 in not supported.\n\n## Supported Devices\n\n\u003cstrong\u003e\u003cem\u003e AMD APU Family with AMD Radeon™ HD Graphics \u003c/em\u003e\u003c/strong\u003e\n+\tA-Series\n+\tC-Series\n+\tE-Series\n+\tE2-Series\n+\tG-Series\n+\tR-Series\n\n\u003cstrong\u003e\u003cem\u003e AMD Radeon™ HD Graphics \u003c/em\u003e\u003c/strong\u003e\n+   7900 Series (7990, 7970, 7950)\n+\t7800 Series (7870, 7850)\n+\t7700 Series (7770, 7750)\n\n\u003cstrong\u003e\u003cem\u003e AMD Radeon™ HD Graphics \u003c/em\u003e\u003c/strong\u003e\n+\t6900 Series (6990, 6970, 6950)\n+\t6800 Series (6870, 6850)\n+\t6700 Series (6790 , 6770, 6750)\n+\t6600 Series (6670)\n+\t6500 Series (6570)\n+\t6400 Series (6450)\n+\t6xxxM Series\n\n\u003cstrong\u003e\u003cem\u003e AMD Radeon™ Rx 2xx Graphics \u003c/em\u003e\u003c/strong\u003e\n+\tR9 2xx Series\n+\tR8 2xx Series\n+\tR7 2xx Series\n\n\u003cstrong\u003e\u003cem\u003e AMD FirePro™ Professional Graphics  \u003c/em\u003e\u003c/strong\u003e\n+ \tW9100\n\nCompiled binary windows packages (zip packages) for Bolt may be downloaded from the \u003ca href=\"http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/bolt-c-template-library/\"\u003eBolt landing page\u003c/a\u003e hosted on AMD's Developer Central website.\n\n## Examples\n\nThe simple example below shows how to use Bolt to sort a random array of 8192 integers.\n\n    #include \u003cbolt/cl/sort.h\u003e\n    #include \u003cvector\u003e\n    #include \u003calgorithm\u003e\n    \n    int main ()\n    {\n        // generate random data (on host)\n        size_t length = 8192\n        std::vector\u003cint\u003e a (length);\n        std::generate ( a.begin (), a.end(), rand );\n    \n        // sort, run on best device in the platform\n        bolt::cl::sort(a.begin(), a.end());\n        return 0;\n    }\n\nThe code will be familiar to programmers who have used the C++ Standard Template Library; the difference is the include file (bolt/cl/sort.h) and the bolt::cl namespace before the sort call. Bolt developers do not need to learn a new device-specific programming model to leverage the power and performance advantages of heterogeneous computing.\n\n    #include \u003cbolt/cl/device_vector.h\u003e\n    #include \u003cbolt/cl/scan.h\u003e\n    #include \u003cvector\u003e\n    #include \u003cnumeric\u003e\n    \n    int main()\n    {\n      size_t length = 1024;\n      // Create device_vector and initialize it to 1\n      bolt::cl::device_vector\u003c int \u003e boltInput( length, 1 );\n    \n      // Calculate the inclusive_scan of the device_vector\n      bolt::cl::inclusive_scan(boltInput.begin(),boltInput.end(),boltInput.begin( ) );\n    \n      // Create an std vector and initialize it to 1\n      std::vector\u003cint\u003e stdInput( length, 1 );\n     \n      // Calculate the inclusive_scan of the std vector\n      bolt::cl::inclusive_scan(stdInput.begin( ),stdInput.end( ),stdInput.begin( ) );\n      return 0;\n    }\n\nThis example shows how Bolt simplifies management of heterogeneous memory.  The creation and destruction of device resident memory is abstracted inside of the `bolt::cl::device_vector \u003c\u003e` class, which provides an interface familiar to nearly all C++ programmers.  All of Bolt’s provided algorithms can take either the normal std::vector or the `bolt::cl::device_vector\u003c\u003e` class, which allows the user to control when and where memory is transferred between host and device to optimize performance.\n\n## Copyright and Licensing information\n\n© 2012,2014 Advanced Micro Devices, Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n       \nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.","funding_links":[],"categories":["TODO scan for Android support in followings","Concurrency","并发执行和多线程","C++","并发性"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHSA-Libraries%2FBolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHSA-Libraries%2FBolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHSA-Libraries%2FBolt/lists"}