Makefile.am 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009, 2010-2012 Université de Bordeaux 1
  4. # Copyright (C) 2010, 2011, 2012 Centre National de la Recherche Scientifique
  5. # Copyright (C) 2011 Télécom-SudParis
  6. # Copyright (C) 2012 INRIA
  7. #
  8. # StarPU is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU Lesser General Public License as published by
  10. # the Free Software Foundation; either version 2.1 of the License, or (at
  11. # your option) any later version.
  12. #
  13. # StarPU is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. #
  17. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  18. AM_CFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
  19. AM_CXXFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
  20. LIBS = $(top_builddir)/src/libstarpu-@STARPU_EFFECTIVE_VERSION@.la $(MAGMA_LIBS) $(HWLOC_LIBS) @LIBS@
  21. AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
  22. AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS) $(STARPU_OPENCL_LDFLAGS)
  23. SUBDIRS = stencil
  24. BUILT_SOURCES =
  25. if STARPU_USE_OPENCL
  26. nobase_STARPU_OPENCL_DATA_DATA =
  27. endif
  28. EXTRA_DIST = \
  29. basic_examples/vector_scal_opencl_kernel.cl \
  30. basic_examples/multiformat_opencl_kernel.cl \
  31. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl \
  32. common/blas_model.c \
  33. spmv/spmv_cuda.cu \
  34. spmv/spmv_opencl.cl \
  35. gordon/null_kernel_gordon.c \
  36. mult/xgemm.c \
  37. lu/xlu.c \
  38. lu/xlu_pivot.c \
  39. lu/xlu_implicit.c \
  40. lu/xlu_implicit_pivot.c \
  41. lu/xlu_kernels.c \
  42. lu/lu_example.c \
  43. incrementer/incrementer_kernels_opencl_kernel.cl \
  44. basic_examples/variable_kernels_opencl_kernel.cl \
  45. matvecmult/matvecmult_kernel.cl \
  46. basic_examples/block_opencl_kernel.cl \
  47. openmp/vector_scal.c \
  48. filters/fblock_opencl_kernel.cl \
  49. filters/custom_mf/conversion_opencl.cl \
  50. filters/custom_mf/custom_opencl.cl \
  51. interface/complex_kernels.cl
  52. CLEANFILES = \
  53. gordon/null_kernel_gordon.spuelf
  54. CLEANFILES += *.gcno *.gcda *.linkinfo
  55. if STARPU_USE_CUDA
  56. NVCCFLAGS += --compiler-options -fno-strict-aliasing -I$(top_srcdir)/include/ -I$(top_builddir)/include/ -I$(top_srcdir)/examples/ $(HWLOC_CFLAGS) -arch sm_13
  57. .cu.o:
  58. $(NVCC) $< -c -o $@ $(NVCCFLAGS)
  59. endif
  60. if STARPU_USE_GORDON
  61. SPU_CC ?= spu-gcc
  62. SPU_LD ?= spu-ld
  63. SPULDFLAGS =
  64. SPULIBS = -lblas #-lc -lgloss -lc
  65. .c.spuo:
  66. $(MKDIR_P) `dirname $@`
  67. $(SPU_CC) -c -fpic $< -o $@
  68. .spuo.spuelf:
  69. $(MKDIR_P) `dirname $@`
  70. $(SPU_LD) $(SPULDFLAGS) $< -o $@ $(SPULIBS)
  71. BUILT_SOURCES += \
  72. gordon/null_kernel_gordon.spuelf
  73. endif
  74. if STARPU_HAVE_ICC
  75. .icc.o:
  76. $(ICC) -x c $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
  77. $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $< -c -o $@
  78. endif
  79. examplebindir = $(libdir)/starpu/examples/
  80. examplebin_PROGRAMS =
  81. noinst_HEADERS = \
  82. cg/cg.h \
  83. heat/lu_kernels_model.h \
  84. heat/dw_sparse_cg.h \
  85. heat/heat.h \
  86. heat/dw_factolu.h \
  87. lu/xlu.h \
  88. lu/xlu_kernels.h \
  89. lu/float.h \
  90. lu/double.h \
  91. lu/complex_float.h \
  92. lu/complex_double.h \
  93. lu/blas_complex.h \
  94. cholesky/cholesky.h \
  95. common/blas_model.h \
  96. common/blas.h \
  97. mult/simple.h \
  98. mult/double.h \
  99. gordon/null.h \
  100. fortran/bindings/StarPU_fortran.h \
  101. ppm_downscaler/ppm_downscaler.h \
  102. ppm_downscaler/yuv_downscaler.h \
  103. spmv/matrix_market/mmio.h \
  104. spmv/matrix_market/mm_to_bcsr.h \
  105. spmv/spmv.h \
  106. spmv/dw_block_spmv.h \
  107. basic_examples/multiformat_types.h \
  108. filters/custom_mf/custom_interface.h \
  109. filters/custom_mf/custom_types.h \
  110. interface/complex_interface.h \
  111. pi/pi.h \
  112. pi/SobolQRNG/sobol.h \
  113. pi/SobolQRNG/sobol_gold.h \
  114. pi/SobolQRNG/sobol_gpu.h \
  115. pi/SobolQRNG/sobol_primitives.h
  116. #####################################
  117. # What to install and what to check #
  118. #####################################
  119. STARPU_EXAMPLES =
  120. TESTS = $(STARPU_EXAMPLES)
  121. if STARPU_HAVE_WINDOWS
  122. check_PROGRAMS = $(STARPU_EXAMPLES)
  123. else
  124. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  125. endif
  126. if !STARPU_HAVE_WINDOWS
  127. ## test loader program
  128. LOADER = loader
  129. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  130. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  131. loader_SOURCES = ../tests/loader.c
  132. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  133. endif
  134. examplebin_PROGRAMS += \
  135. basic_examples/hello_world \
  136. basic_examples/vector_scal \
  137. basic_examples/mult \
  138. basic_examples/block \
  139. basic_examples/variable \
  140. basic_examples/multiformat \
  141. cpp/incrementer_cpp \
  142. filters/custom_mf/custom_mf_filter \
  143. filters/fvector \
  144. filters/fblock \
  145. filters/fmatrix \
  146. tag_example/tag_example \
  147. tag_example/tag_example2 \
  148. tag_example/tag_example3 \
  149. tag_example/tag_example4 \
  150. tag_example/tag_restartable \
  151. spmv/spmv \
  152. callback/callback \
  153. incrementer/incrementer \
  154. interface/complex \
  155. matvecmult/matvecmult \
  156. profiling/profiling \
  157. scheduler/dummy_sched \
  158. reductions/dot_product \
  159. reductions/minmax_reduction \
  160. mandelbrot/mandelbrot \
  161. ppm_downscaler/ppm_downscaler \
  162. ppm_downscaler/yuv_downscaler
  163. if STARPU_HAVE_F77_H
  164. examplebin_PROGRAMS += \
  165. basic_examples/vector_scal_fortran
  166. endif
  167. if !NO_BLAS_LIB
  168. examplebin_PROGRAMS += \
  169. axpy/axpy \
  170. mult/sgemm \
  171. mult/dgemm \
  172. cholesky/cholesky_tag \
  173. cholesky/cholesky_tile_tag \
  174. cholesky/cholesky_grain_tag \
  175. cholesky/cholesky_implicit \
  176. lu/lu_example_float \
  177. lu/lu_example_double \
  178. lu/lu_implicit_example_float \
  179. lu/lu_implicit_example_double \
  180. heat/heat \
  181. cg/cg
  182. endif
  183. if MKL_BLAS_LIB
  184. examplebin_PROGRAMS += \
  185. lu/lu_example_complex_float \
  186. lu/lu_example_complex_double \
  187. lu/lu_implicit_example_complex_float \
  188. lu/lu_implicit_example_complex_double
  189. endif
  190. if ATLAS_BLAS_LIB
  191. examplebin_PROGRAMS += \
  192. spmv/dw_block_spmv
  193. endif
  194. STARPU_EXAMPLES += \
  195. basic_examples/hello_world \
  196. basic_examples/vector_scal \
  197. basic_examples/mult \
  198. basic_examples/block \
  199. basic_examples/variable \
  200. basic_examples/multiformat \
  201. cpp/incrementer_cpp \
  202. filters/fvector \
  203. filters/fblock \
  204. filters/fmatrix \
  205. tag_example/tag_example \
  206. tag_example/tag_example2 \
  207. tag_example/tag_example3 \
  208. tag_example/tag_example4 \
  209. tag_example/tag_restartable \
  210. spmv/spmv \
  211. callback/callback \
  212. incrementer/incrementer \
  213. interface/complex \
  214. matvecmult/matvecmult \
  215. profiling/profiling \
  216. scheduler/dummy_sched \
  217. reductions/dot_product \
  218. reductions/minmax_reduction
  219. if STARPU_HAVE_F77_H
  220. STARPU_EXAMPLES += \
  221. basic_examples/vector_scal_fortran
  222. endif
  223. if !NO_BLAS_LIB
  224. STARPU_EXAMPLES += \
  225. axpy/axpy \
  226. mult/sgemm \
  227. mult/dgemm \
  228. cholesky/cholesky_tag \
  229. cholesky/cholesky_tile_tag \
  230. cholesky/cholesky_grain_tag \
  231. cholesky/cholesky_implicit \
  232. lu/lu_example_float \
  233. lu/lu_example_double \
  234. lu/lu_implicit_example_float \
  235. lu/lu_implicit_example_double \
  236. heat/heat \
  237. cg/cg
  238. endif
  239. if MKL_BLAS_LIB
  240. STARPU_EXAMPLES += \
  241. lu/lu_example_complex_float \
  242. lu/lu_example_complex_double \
  243. lu/lu_implicit_example_complex_float \
  244. lu/lu_implicit_example_complex_double
  245. endif
  246. if ATLAS_BLAS_LIB
  247. STARPU_EXAMPLES += \
  248. spmv/dw_block_spmv
  249. endif
  250. ##################
  251. # Basic examples #
  252. ##################
  253. basic_examples_vector_scal_SOURCES = \
  254. basic_examples/vector_scal.c \
  255. basic_examples/vector_scal_cpu.c
  256. if STARPU_HAVE_ICC
  257. basic_examples_vector_scal_SOURCES += \
  258. basic_examples/vector_scal_cpu_icc.icc
  259. basic_examples/vector_scal_cpu_icc.o: CFLAGS += -Dscal_cpu_func=scal_cpu_func_icc -Dscal_sse_func=scal_sse_func_icc
  260. endif
  261. if STARPU_USE_CUDA
  262. basic_examples_vector_scal_SOURCES += \
  263. basic_examples/vector_scal_cuda.cu
  264. endif
  265. if STARPU_USE_OPENCL
  266. basic_examples_vector_scal_SOURCES += \
  267. basic_examples/vector_scal_opencl.c
  268. nobase_STARPU_OPENCL_DATA_DATA += \
  269. basic_examples/vector_scal_opencl_kernel.cl
  270. endif
  271. if STARPU_HAVE_F77_H
  272. basic_examples_vector_scal_fortran_SOURCES = \
  273. basic_examples/vector_scal_fortran.F \
  274. basic_examples/vector_scal_c.c \
  275. basic_examples/vector_scal_cpu.c
  276. if STARPU_USE_CUDA
  277. basic_examples_vector_scal_fortran_SOURCES += \
  278. basic_examples/vector_scal_cuda.cu
  279. basic_examples_vector_scal_fortran_LDADD = \
  280. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  281. endif
  282. endif
  283. #######################
  284. # Multiformat example #
  285. #######################
  286. basic_examples_multiformat_SOURCES = \
  287. basic_examples/multiformat.c \
  288. basic_examples/multiformat_conversion_codelets.c
  289. if STARPU_USE_CUDA
  290. basic_examples_multiformat_SOURCES+= \
  291. basic_examples/multiformat_cuda.cu \
  292. basic_examples/multiformat_conversion_codelets_cuda.cu
  293. endif
  294. if STARPU_USE_OPENCL
  295. basic_examples_multiformat_SOURCES+= \
  296. basic_examples/multiformat_opencl.c \
  297. basic_examples/multiformat_conversion_codelets_opencl.c
  298. nobase_STARPU_OPENCL_DATA_DATA+= \
  299. basic_examples/multiformat_opencl_kernel.cl \
  300. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  301. endif
  302. #################
  303. # block example #
  304. #################
  305. basic_examples_block_SOURCES = \
  306. basic_examples/block.c \
  307. basic_examples/block_cpu.c
  308. if STARPU_USE_CUDA
  309. basic_examples_block_SOURCES += \
  310. basic_examples/block_cuda.cu
  311. endif
  312. if STARPU_USE_OPENCL
  313. basic_examples_block_SOURCES += \
  314. basic_examples/block_opencl.c
  315. nobase_STARPU_OPENCL_DATA_DATA += \
  316. basic_examples/block_opencl_kernel.cl
  317. endif
  318. ####################
  319. # Variable example #
  320. ####################
  321. basic_examples_variable_SOURCES = \
  322. basic_examples/variable.c \
  323. basic_examples/variable_kernels_cpu.c
  324. if STARPU_USE_CUDA
  325. basic_examples_variable_SOURCES += \
  326. basic_examples/variable_kernels.cu
  327. endif
  328. if STARPU_USE_OPENCL
  329. basic_examples_variable_SOURCES += \
  330. basic_examples/variable_kernels_opencl.c
  331. nobase_STARPU_OPENCL_DATA_DATA += \
  332. basic_examples/variable_kernels_opencl_kernel.cl
  333. endif
  334. ###########
  335. # Filters #
  336. ###########
  337. filters_fblock_SOURCES = \
  338. filters/fblock.c \
  339. filters/fblock_cpu.c
  340. if STARPU_USE_CUDA
  341. filters_fblock_SOURCES += \
  342. filters/fblock_cuda.cu
  343. endif
  344. if STARPU_USE_OPENCL
  345. filters_fblock_SOURCES += \
  346. filters/fblock_opencl.c
  347. nobase_STARPU_OPENCL_DATA_DATA += \
  348. filters/fblock_opencl_kernel.cl
  349. endif
  350. #############################
  351. # Custom multiformat filter #
  352. #############################
  353. filters_custom_mf_custom_mf_filter_SOURCES=\
  354. filters/custom_mf/custom_mf_filter.c \
  355. filters/custom_mf/custom_interface.c \
  356. filters/custom_mf/custom_conversion_codelets.c
  357. if STARPU_USE_CUDA
  358. filters_custom_mf_custom_mf_filter_SOURCES+=\
  359. filters/custom_mf/conversion.cu \
  360. filters/custom_mf/cuda.cu
  361. endif
  362. if STARPU_USE_OPENCL
  363. filters_custom_mf_custom_mf_filter_SOURCES+=\
  364. filters/custom_mf/conversion_opencl.c \
  365. filters/custom_mf/custom_opencl.c
  366. nobase_STARPU_OPENCL_DATA_DATA += \
  367. filters/custom_mf/conversion_opencl.cl \
  368. filters/custom_mf/custom_opencl.cl
  369. endif
  370. ################
  371. # AXPY example #
  372. ################
  373. if !NO_BLAS_LIB
  374. axpy_axpy_SOURCES = \
  375. axpy/axpy.c \
  376. common/blas.c
  377. axpy_axpy_LDADD = \
  378. $(STARPU_BLAS_LDFLAGS)
  379. endif
  380. ################
  381. # Mult example #
  382. ################
  383. if !NO_BLAS_LIB
  384. mult_sgemm_SOURCES = \
  385. mult/sgemm.c \
  386. common/blas.c
  387. mult_sgemm_LDADD = \
  388. $(STARPU_BLAS_LDFLAGS)
  389. mult_dgemm_SOURCES = \
  390. mult/dgemm.c \
  391. common/blas.c
  392. mult_dgemm_LDADD = \
  393. $(STARPU_BLAS_LDFLAGS)
  394. endif
  395. ####################
  396. # Cholesky example #
  397. ####################
  398. if !NO_BLAS_LIB
  399. cholesky_cholesky_tag_SOURCES = \
  400. cholesky/cholesky_tag.c \
  401. cholesky/cholesky_models.c \
  402. cholesky/cholesky_kernels.c \
  403. common/blas.c
  404. cholesky_cholesky_tag_LDADD = \
  405. $(STARPU_BLAS_LDFLAGS)
  406. cholesky_cholesky_tile_tag_SOURCES = \
  407. cholesky/cholesky_tile_tag.c \
  408. cholesky/cholesky_models.c \
  409. cholesky/cholesky_kernels.c \
  410. common/blas.c
  411. cholesky_cholesky_tile_tag_LDADD = \
  412. $(STARPU_BLAS_LDFLAGS)
  413. cholesky_cholesky_grain_tag_SOURCES = \
  414. cholesky/cholesky_grain_tag.c \
  415. cholesky/cholesky_models.c \
  416. cholesky/cholesky_kernels.c \
  417. common/blas.c
  418. cholesky_cholesky_grain_tag_LDADD = \
  419. $(STARPU_BLAS_LDFLAGS)
  420. cholesky_cholesky_implicit_SOURCES = \
  421. cholesky/cholesky_implicit.c \
  422. cholesky/cholesky_models.c \
  423. cholesky/cholesky_kernels.c \
  424. common/blas.c
  425. cholesky_cholesky_implicit_LDADD = \
  426. $(STARPU_BLAS_LDFLAGS)
  427. endif
  428. ##############
  429. # LU example #
  430. ##############
  431. if !NO_BLAS_LIB
  432. lu_lu_example_float_SOURCES = \
  433. lu/lu_example_float.c \
  434. lu/slu.c \
  435. lu/slu_pivot.c \
  436. lu/slu_kernels.c \
  437. common/blas.c
  438. lu_lu_example_float_LDADD = \
  439. $(STARPU_BLAS_LDFLAGS)
  440. lu_lu_example_double_SOURCES = \
  441. lu/lu_example_double.c \
  442. lu/dlu.c \
  443. lu/dlu_pivot.c \
  444. lu/dlu_kernels.c \
  445. common/blas.c
  446. lu_lu_example_double_LDADD = \
  447. $(STARPU_BLAS_LDFLAGS)
  448. lu_lu_implicit_example_float_SOURCES = \
  449. lu/lu_example_float.c \
  450. lu/slu_implicit.c \
  451. lu/slu_implicit_pivot.c \
  452. lu/slu_kernels.c \
  453. common/blas.c
  454. lu_lu_implicit_example_float_LDADD = \
  455. $(STARPU_BLAS_LDFLAGS)
  456. lu_lu_implicit_example_double_SOURCES = \
  457. lu/lu_example_double.c \
  458. lu/dlu_implicit.c \
  459. lu/dlu_implicit_pivot.c \
  460. lu/dlu_kernels.c \
  461. common/blas.c
  462. lu_lu_implicit_example_double_LDADD = \
  463. $(STARPU_BLAS_LDFLAGS)
  464. if MKL_BLAS_LIB
  465. lu_lu_example_complex_float_SOURCES = \
  466. lu/lu_example_complex_float.c \
  467. lu/clu.c \
  468. lu/clu_pivot.c \
  469. lu/clu_kernels.c \
  470. lu/blas_complex.c \
  471. common/blas.c
  472. lu_lu_example_complex_float_LDADD = \
  473. $(STARPU_BLAS_LDFLAGS)
  474. lu_lu_implicit_example_complex_float_SOURCES = \
  475. lu/lu_example_complex_float.c \
  476. lu/clu_implicit.c \
  477. lu/clu_implicit_pivot.c \
  478. lu/clu_kernels.c \
  479. lu/blas_complex.c \
  480. common/blas.c
  481. lu_lu_implicit_example_complex_float_LDADD = \
  482. $(STARPU_BLAS_LDFLAGS)
  483. lu_lu_example_complex_double_SOURCES = \
  484. lu/lu_example_complex_double.c \
  485. lu/zlu.c \
  486. lu/zlu_pivot.c \
  487. lu/zlu_kernels.c \
  488. lu/blas_complex.c \
  489. common/blas.c
  490. lu_lu_example_complex_double_LDADD = \
  491. $(STARPU_BLAS_LDFLAGS)
  492. lu_lu_implicit_example_complex_double_SOURCES = \
  493. lu/lu_example_complex_double.c \
  494. lu/zlu_implicit.c \
  495. lu/zlu_implicit_pivot.c \
  496. lu/zlu_kernels.c \
  497. lu/blas_complex.c \
  498. common/blas.c
  499. lu_lu_implicit_example_complex_double_LDADD = \
  500. $(STARPU_BLAS_LDFLAGS)
  501. endif
  502. endif
  503. ################
  504. # Heat example #
  505. ################
  506. if !NO_BLAS_LIB
  507. heat_heat_SOURCES = \
  508. heat/heat.c \
  509. heat/dw_factolu.c \
  510. heat/dw_factolu_tag.c \
  511. heat/dw_factolu_grain.c \
  512. heat/dw_sparse_cg.c \
  513. heat/heat_display.c \
  514. heat/lu_kernels_model.c \
  515. heat/dw_sparse_cg_kernels.c \
  516. heat/dw_factolu_kernels.c \
  517. common/blas.c
  518. heat_heat_LDADD = \
  519. $(STARPU_OPENGL_RENDER_LDFLAGS) \
  520. $(STARPU_BLAS_LDFLAGS)
  521. endif
  522. ##############
  523. # CG example #
  524. ##############
  525. if !NO_BLAS_LIB
  526. cg_cg_SOURCES = \
  527. cg/cg.c \
  528. cg/cg_kernels.c \
  529. common/blas.c
  530. if STARPU_USE_CUDA
  531. cg_cg_SOURCES += \
  532. cg/cg_dot_kernel.cu
  533. endif
  534. cg_cg_LDADD = \
  535. $(STARPU_BLAS_LDFLAGS)
  536. endif
  537. ################
  538. # SpMV example #
  539. ################
  540. spmv_spmv_SOURCES = \
  541. spmv/spmv.c \
  542. spmv/spmv_kernels.c
  543. if STARPU_USE_CUDA
  544. spmv_spmv_SOURCES += \
  545. spmv/spmv_cuda.cu
  546. endif
  547. if ATLAS_BLAS_LIB
  548. spmv_dw_block_spmv_SOURCES = \
  549. spmv/dw_block_spmv.c \
  550. spmv/dw_block_spmv_kernels.c \
  551. spmv/matrix_market/mm_to_bcsr.c \
  552. spmv/matrix_market/mmio.c
  553. spmv_dw_block_spmv_LDADD = \
  554. $(STARPU_BLAS_LDFLAGS)
  555. endif
  556. ###########################
  557. # C++ Incrementer example #
  558. ###########################
  559. cpp_incrementer_cpp_SOURCES = \
  560. cpp/incrementer_cpp.cpp
  561. #if STARPU_USE_CUDA
  562. #cpp_incrementer_cpp_SOURCES += \
  563. # incrementer/incrementer_kernels.cu
  564. #endif
  565. #######################
  566. # Incrementer example #
  567. #######################
  568. incrementer_incrementer_SOURCES = \
  569. incrementer/incrementer.c
  570. if STARPU_USE_CUDA
  571. incrementer_incrementer_SOURCES += \
  572. incrementer/incrementer_kernels.cu
  573. endif
  574. if STARPU_USE_OPENCL
  575. incrementer_incrementer_SOURCES += \
  576. incrementer/incrementer_kernels_opencl.c
  577. nobase_STARPU_OPENCL_DATA_DATA += \
  578. incrementer/incrementer_kernels_opencl_kernel.cl
  579. endif
  580. #####################
  581. # interface example #
  582. #####################
  583. interface_complex_SOURCES = \
  584. interface/complex.c \
  585. interface/complex_interface.c
  586. if STARPU_USE_CUDA
  587. interface_complex_SOURCES += \
  588. interface/complex_kernels.cu
  589. endif
  590. if STARPU_USE_OPENCL
  591. interface_complex_SOURCES +=\
  592. interface/complex_kernels_opencl.c
  593. nobase_STARPU_OPENCL_DATA_DATA += \
  594. interface/complex_kernels.cl
  595. endif
  596. ######################
  597. # matVecMult example #
  598. ######################
  599. if STARPU_USE_OPENCL
  600. nobase_STARPU_OPENCL_DATA_DATA += \
  601. matvecmult/matvecmult_kernel.cl
  602. endif
  603. #######################
  604. # dot_product example #
  605. #######################
  606. reductions_dot_product_SOURCES = \
  607. reductions/dot_product.c
  608. if STARPU_USE_CUDA
  609. reductions_dot_product_SOURCES += \
  610. reductions/dot_product_kernels.cu
  611. endif
  612. ##################
  613. # Mandelbrot Set #
  614. ##################
  615. mandelbrot_mandelbrot_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
  616. if HAVE_X11
  617. mandelbrot_mandelbrot_CPPFLAGS += $(X_CFLAGS)
  618. mandelbrot_mandelbrot_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS) -lX11
  619. endif
  620. ################
  621. # Top Examples #
  622. ################
  623. examplebin_PROGRAMS += \
  624. top/hello_world_top
  625. top_hello_world_top_SOURCES = \
  626. top/hello_world_top.c
  627. ######
  628. # Pi #
  629. ######
  630. check_PROGRAMS += \
  631. pi/pi \
  632. pi/pi_redux
  633. examplebin_PROGRAMS += \
  634. pi/pi \
  635. pi/pi_redux
  636. pi_pi_SOURCES = \
  637. pi/pi.c \
  638. pi/SobolQRNG/sobol_gold.c \
  639. pi/SobolQRNG/sobol_primitives.c
  640. if STARPU_USE_CUDA
  641. pi_pi_SOURCES += \
  642. pi/pi_kernel.cu \
  643. pi/SobolQRNG/sobol_gpu.cu
  644. endif
  645. pi_pi_redux_SOURCES = \
  646. pi/pi_redux.c
  647. if STARPU_USE_CUDA
  648. pi_pi_redux_SOURCES += \
  649. pi/pi_redux_kernel.cu
  650. pi_pi_redux_LDADD = \
  651. $(STARPU_CURAND_LDFLAGS)
  652. endif
  653. showcheck:
  654. -cat $(TEST_LOGS) /dev/null
  655. for i in $(SUBDIRS) ; do \
  656. make -C $$i showcheck ; \
  657. done