File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,10 @@ class clfft_base
238
238
ret = clfftInitSetupData (&fftSetup);
239
239
if (ret < CL_SUCCESS) std::cerr << clfft_errorstring (ret) << std::endl;
240
240
assert (ret >= CL_SUCCESS);
241
+ #ifdef DEBUG
242
+ fftSetup.debugFlags = CLFFT_DUMP_PROGRAMS;
243
+ #endif
244
+
241
245
ret = clfftSetup (&fftSetup);
242
246
if (ret < CL_SUCCESS) std::cerr << clfft_errorstring (ret) << std::endl;
243
247
assert (ret >= CL_SUCCESS);
Original file line number Diff line number Diff line change @@ -35,7 +35,13 @@ vpath %.c ../
35
35
36
36
# Set up CXXFLAGS
37
37
CXXFLAGS =
38
- CXXFLAGS+ =-O3
38
+ ifeq (debug,$(firstword $(MAKECMDGOALS ) ) )
39
+ CXXFLAGS+=-ggdb -g3 -Og
40
+ CXXFLAGS+=-DDEBUG
41
+ else
42
+ CXXFLAGS+=-Ofast
43
+ endif
44
+
39
45
CXXFLAGS+ =-Wall
40
46
41
47
CXXFLAGS+ =$(INCL )
@@ -66,6 +72,8 @@ SRCS_C=clutils
66
72
OBJS=$(SRCS_CPP: =.o) $(SRCS_C:=.o )
67
73
ALL =$(SRCS_CPP ) $(SRCS_C ) $(OUTPUT )
68
74
75
+ debug : $(OUTPUT )
76
+
69
77
all : $(OUTPUT )
70
78
71
79
fft1 : $(OBJS ) fft1.o
You can’t perform that action at this time.
0 commit comments