+1
This commit is contained in:
37
examples_cuda/mandelbrot_tasks3d/Makefile_knc
Normal file
37
examples_cuda/mandelbrot_tasks3d/Makefile_knc
Normal file
@@ -0,0 +1,37 @@
|
||||
PROG=mandelbrot_mic
|
||||
ISPC_SRC=mandelbrot_tasks3d.ispc
|
||||
CXX_SRC=mandelbrot_tasks3d.cpp ../tasksys.cpp
|
||||
|
||||
CXX=icc
|
||||
CXXFLAGS=-O3 -I$(CUDATK)/include -mmic -openmp
|
||||
LD=icc
|
||||
LDFLAGS=-mmic -openmp
|
||||
|
||||
ISPC=ispc
|
||||
ISPCFLAGS=-O3 --math-lib=default --target=generic-16 --c++-include-file=../intrinsics/knc-i1x16.h --opt=fast-math
|
||||
|
||||
.SUFFIXES: .o .cpp
|
||||
|
||||
|
||||
ISPC_OBJ=$(ISPC_SRC:%.ispc=%_ispc.o)
|
||||
CXX_OBJ=$(CXX_SRC:%.cpp=%.o)
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
|
||||
|
||||
$(PROG): $(ISPC_OBJ) $(CXX_OBJ)
|
||||
$(LD) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
||||
%_ispc.o: %.ispc
|
||||
$(ISPC) $(ISPCFLAGS) --emit-c++ -o `basename $< .ispc`_ispc_zmm.cpp -h `basename $< .ispc`_ispc.h $<
|
||||
$(CXX) $(CXXFLAGS) -o $@ `basename $< .ispc`_ispc_zmm.cpp -c
|
||||
|
||||
clean:
|
||||
/bin/rm -rf *_ispc_zmm.cpp *.o $(PROG)
|
||||
|
||||
|
||||
|
||||
@@ -14,24 +14,21 @@ ISPCFLAGS=-O3 --math-lib=default --target=generic-16 --c++-include-file=../intri
|
||||
|
||||
|
||||
ISPC_OBJ=$(ISPC_SRC:%.ispc=%_ispc.o)
|
||||
ISPC_ZMM=$(ISPC_SRC:%.ispc=%_ispc_zmm.cpp)
|
||||
CXX_OBJ=$(ISPC_ZMM:%_zmm.cpp=%.o)
|
||||
CXX_OBJ+=$(CXX_SRC:%.cpp=%.o)
|
||||
CXX_OBJ=$(CXX_SRC:%.cpp=%.o)
|
||||
|
||||
all: $(PROG)
|
||||
|
||||
|
||||
$(CXX_OBJ) : $(ISPC_ZMM)
|
||||
|
||||
$(PROG): $(CXX_OBJ)
|
||||
$(LD) -o $@ $(CXX_OBJ) $(LDFLAGS)
|
||||
$(PROG): $(ISPC_OBJ) $(CXX_OBJ)
|
||||
$(LD) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
||||
|
||||
%_ispc_zmm.cpp: %.ispc
|
||||
$(ISPC) $(ISPCFLAGS) --emit-c++ -o `basename $< .ispc`_zmm.cpp -h `basename $< .ispc`_ispc.h $<
|
||||
%_ispc.o: %.ispc
|
||||
$(ISPC) $(ISPCFLAGS) --emit-c++ -o `basename $< .ispc`_ispc_zmm.cpp -h `basename $< .ispc`_ispc.h $<
|
||||
$(CXX) $(CXXFLAGS) -o $@ `basename $< .ispc`_ispc_zmm.cpp -c
|
||||
|
||||
clean:
|
||||
/bin/rm -rf *_ispc_zmm.cpp *.o $(PROG)
|
||||
|
||||
Reference in New Issue
Block a user