#compilers
CC=/usr/local/cuda-13.0/bin/nvcc

NVCC_FLAGS = -O3 -ccbin /usr/bin -m64 -gencode arch=compute_80,code=sm_80

# #ENVIRONMENT_PARAMETERS
# CUDA_INSTALL_PATH = /usr/local/cuda-12.0

CUDA_LIBS = -lcusparse -lcublas
LIBS =  -lineinfo $(CUDA_LIBS)

#options
OPTIONS = -Xcompiler -fopenmp-simd

double:
	$(CC) $(NVCC_FLAGS) src/main_f64.cu -o spmv_double  -D f64 $(OPTIONS) $(LIBS) 

double3:
	$(CC) $(NVCC_FLAGS) src/main_spmv3_f64.cu src/dasp_spmv3.cu -o spmv_double3 -Isrc -D f64 $(OPTIONS) $(LIBS)

half:
	$(CC) $(NVCC_FLAGS) src/main_f16.cu -o spmv_half $(OPTIONS) $(LIBS) 

clean:
	rm -rf spmv_double
	rm -rf spmv_double3
	rm -rf spmv_half
	rm data/*.csv