Makefile.am 17 KB

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