How to compile:

You need to have working CUDA toolkit installation on the machine and nvcc compiler available on the system path. To run these examples mkl and fftw3 libraries also need to be present on the system.

$CUDAPATH, $MKLROOT and $FFTW3HOME should have values of paths for CUDA, mkl and fftw3 installations.

cublas_dgemm: icc -o cublas_dgemm cublas_dgemm.c -I$CUDAPATH/include -I$MKLROOT/include/ -L$MKLROOT/lib/intel64/ -lmkl_core -lmkl_sequential -lmkl_intel_lp64 -lm -L$CUDAPATH/lib64/ -lcublas -lcudart

cufft_test: icc -o cufft_test cufft_test.c -I$FFTW3PATH/include -I$CUDAPATH/include -L$FFTW3PATH/lib -lfftw3 -L$CUDAPATH/lib64/ -lcufft -lcudart

cuda_reduction_sum: nvcc -o cuda_reduction_sum cuda_reduction_sum.cu
