Add Makefile for RAJA

This commit is contained in:
Tom Deakin 2017-02-23 15:52:43 +00:00
parent dde301b069
commit 07f91e605e

32
RAJA.make Normal file
View File

@ -0,0 +1,32 @@
ifndef TARGET
$(info No target defined. Specify CPU or GPU. Defaulting to CPU)
TARGET=CPU
endif
ifeq ($(TARGET), CPU)
COMP=$(CXX)
CFLAGS = -O3 -std=c++11 -DRAJA_TARGET_CPU
ifndef COMPILER
$(error No COMPILER defined. Specify COMPILER for correct OpenMP flag.)
endif
ifeq ($(COMPILER), INTEL)
COMP = icpc
CFLAGS += -qopenmp
else ifeq ($(COMPILER), GNU)
COMP = g++
CFLAGS += -fopenmp
else ifeq ($(COMPILER), CRAY)
COMP = CC
CFLAGS +=
endif
else ifeq ($(TARGET), GPU)
COMP = nvcc
CFLAGS = --expt-extended-lambda -O3 -std=c++11 -x cu -Xcompiler -fopenmp
endif
raja-stream: main.cpp RAJAStream.cpp
$(COMP) $(CFLAGS) -DUSE_RAJA -I$(RAJA_PATH)/include $^ -L$(RAJA_PATH)/lib -lRAJA -o $@