Makefile.am 18 KB

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