Compile with nvcc matrix.cu -lcublas under linux.
A video using cuBLAS for vector addition can be found here.
Compile with nvcc matrix.cu -lcublasLt under linux.