Skip to content

Instantly share code, notes, and snippets.

@rharriso
Last active October 14, 2018 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rharriso/786c3db8cd65ab8f161aecb078414556 to your computer and use it in GitHub Desktop.
Save rharriso/786c3db8cd65ab8f161aecb078414556 to your computer and use it in GitHub Desktop.
Looking at Cuda and Thrust: Makefile
CC:=/usr/local/cuda-9.1/bin/nvcc
PROF:=/usr/local/cuda-9.1/bin/nvprof
run: main-cuda.cuda
./main-cuda.cuda
prof: main-cuda main-cpu main-thrust
${PROF} ./main-cuda
@echo
${PROF} ./main-thrust
@echo
time ./main-cuda
@echo
time ./main-thrust
@echo
time ./main-cpu
main-cuda: main-cuda.cu
${CC} -ccbin g++-6 main-cuda.cu -o main-cuda
main-thrust: main-thrust.cu
${CC} -ccbin g++-6 main-thrust.cu -o main-thrust
main-cpu: main-cpu.cpp
${CC} -ccbin g++-6 main-cpu.cpp -o main-cpu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment