gpu.cpp — a library for GPU computing

gpu.cpp is a lightweight portable library for computations on graphics co-processors. It only requires a C++ compiler that supports the C++17 standard (developers insist on using clang for some reason) and the library itself. It is claimed to work on any devices supporting Vulkan, Metal, or DirectX.

The advantages of the library as stated by the developers are:

  • compilation speed, reported to be under 5 seconds on modern PCs;
  • simplicity of API;
  • minimal dependencies — the core code fits in gpu.h with about a thousand lines of code, in addition to requiring python3 and make.

The development is based on WebGPU. The library is licensed under the Apache License 2.0.

There are code examples available at the link.

Source: linux.org.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster