Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 602 Bytes

03-blas.md

File metadata and controls

21 lines (14 loc) · 602 Bytes

Example: BLAS

This example shows how a math wrapper library for BLAS can be used.

The example uses the cublasDdot() function to calculate the dot product of two vectors.

cuBLAS APIs are forwarded to use the relevant ROCm APIs. Note that the example links to cublas in its CMakeLists.txt. Just like in other examples, this allows seamless transition of projects to SCALE without code modification.

Example source code

---8<--- "public/examples/src/blas/blas.cu"

CMakeLists.txt used

---8<--- "public/examples/src/blas/CMakeLists.txt"