Makefile.am 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  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/SobolQRNG/sobol.h \
  111. pi/SobolQRNG/sobol_gold.h \
  112. pi/SobolQRNG/sobol_gpu.h \
  113. pi/SobolQRNG/sobol_primitives.h
  114. #####################################
  115. # What to install and what to check #
  116. #####################################
  117. STARPU_EXAMPLES =
  118. TESTS = $(STARPU_EXAMPLES)
  119. if STARPU_HAVE_WINDOWS
  120. check_PROGRAMS = $(STARPU_EXAMPLES)
  121. else
  122. check_PROGRAMS = $(LOADER) $(STARPU_EXAMPLES)
  123. endif
  124. if !STARPU_HAVE_WINDOWS
  125. ## test loader program
  126. LOADER = loader
  127. loader_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -I$(top_builddir)/src/
  128. LOADER_BIN = $(abs_top_builddir)/examples/$(LOADER)
  129. loader_SOURCES = ../tests/loader.c
  130. TESTS_ENVIRONMENT = top_builddir="$(abs_top_builddir)" top_srcdir="$(abs_top_srcdir)" $(LOADER_BIN)
  131. endif
  132. examplebin_PROGRAMS += \
  133. basic_examples/hello_world \
  134. basic_examples/vector_scal \
  135. basic_examples/mult \
  136. basic_examples/block \
  137. basic_examples/variable \
  138. basic_examples/multiformat \
  139. cpp/incrementer_cpp \
  140. filters/custom_mf/custom_mf_filter \
  141. filters/fvector \
  142. filters/fblock \
  143. filters/fmatrix \
  144. tag_example/tag_example \
  145. tag_example/tag_example2 \
  146. tag_example/tag_example3 \
  147. tag_example/tag_example4 \
  148. tag_example/tag_restartable \
  149. spmv/spmv \
  150. callback/callback \
  151. incrementer/incrementer \
  152. interface/complex \
  153. matvecmult/matvecmult \
  154. profiling/profiling \
  155. scheduler/dummy_sched \
  156. reductions/dot_product \
  157. reductions/minmax_reduction \
  158. mandelbrot/mandelbrot \
  159. ppm_downscaler/ppm_downscaler \
  160. ppm_downscaler/yuv_downscaler
  161. if STARPU_HAVE_F77_H
  162. examplebin_PROGRAMS += \
  163. basic_examples/vector_scal_fortran
  164. endif
  165. if !NO_BLAS_LIB
  166. examplebin_PROGRAMS += \
  167. axpy/axpy \
  168. mult/sgemm \
  169. mult/dgemm \
  170. cholesky/cholesky_tag \
  171. cholesky/cholesky_tile_tag \
  172. cholesky/cholesky_grain_tag \
  173. cholesky/cholesky_implicit \
  174. lu/lu_example_float \
  175. lu/lu_example_double \
  176. lu/lu_implicit_example_float \
  177. lu/lu_implicit_example_double \
  178. heat/heat \
  179. cg/cg
  180. endif
  181. if MKL_BLAS_LIB
  182. examplebin_PROGRAMS += \
  183. lu/lu_example_complex_float \
  184. lu/lu_example_complex_double \
  185. lu/lu_implicit_example_complex_float \
  186. lu/lu_implicit_example_complex_double
  187. endif
  188. if ATLAS_BLAS_LIB
  189. examplebin_PROGRAMS += \
  190. spmv/dw_block_spmv
  191. endif
  192. STARPU_EXAMPLES += \
  193. basic_examples/hello_world \
  194. basic_examples/vector_scal \
  195. basic_examples/mult \
  196. basic_examples/block \
  197. basic_examples/variable \
  198. basic_examples/multiformat \
  199. cpp/incrementer_cpp \
  200. filters/fvector \
  201. filters/fblock \
  202. filters/fmatrix \
  203. tag_example/tag_example \
  204. tag_example/tag_example2 \
  205. tag_example/tag_example3 \
  206. tag_example/tag_example4 \
  207. tag_example/tag_restartable \
  208. spmv/spmv \
  209. callback/callback \
  210. incrementer/incrementer \
  211. interface/complex \
  212. matvecmult/matvecmult \
  213. profiling/profiling \
  214. scheduler/dummy_sched \
  215. reductions/dot_product \
  216. reductions/minmax_reduction
  217. if STARPU_HAVE_F77_H
  218. STARPU_EXAMPLES += \
  219. basic_examples/vector_scal_fortran
  220. endif
  221. if !NO_BLAS_LIB
  222. STARPU_EXAMPLES += \
  223. axpy/axpy \
  224. mult/sgemm \
  225. mult/dgemm \
  226. cholesky/cholesky_tag \
  227. cholesky/cholesky_tile_tag \
  228. cholesky/cholesky_grain_tag \
  229. cholesky/cholesky_implicit \
  230. lu/lu_example_float \
  231. lu/lu_example_double \
  232. lu/lu_implicit_example_float \
  233. lu/lu_implicit_example_double \
  234. heat/heat \
  235. cg/cg
  236. endif
  237. if MKL_BLAS_LIB
  238. STARPU_EXAMPLES += \
  239. lu/lu_example_complex_float \
  240. lu/lu_example_complex_double \
  241. lu/lu_implicit_example_complex_float \
  242. lu/lu_implicit_example_complex_double
  243. endif
  244. if ATLAS_BLAS_LIB
  245. STARPU_EXAMPLES += \
  246. spmv/dw_block_spmv
  247. endif
  248. ##################
  249. # Basic examples #
  250. ##################
  251. basic_examples_vector_scal_SOURCES = \
  252. basic_examples/vector_scal.c \
  253. basic_examples/vector_scal_cpu.c
  254. if STARPU_HAVE_ICC
  255. basic_examples_vector_scal_SOURCES += \
  256. basic_examples/vector_scal_cpu_icc.icc
  257. basic_examples/vector_scal_cpu_icc.o: CFLAGS += -Dscal_cpu_func=scal_cpu_func_icc -Dscal_sse_func=scal_sse_func_icc
  258. endif
  259. if STARPU_USE_CUDA
  260. basic_examples_vector_scal_SOURCES += \
  261. basic_examples/vector_scal_cuda.cu
  262. endif
  263. if STARPU_USE_OPENCL
  264. basic_examples_vector_scal_SOURCES += \
  265. basic_examples/vector_scal_opencl.c
  266. nobase_STARPU_OPENCL_DATA_DATA += \
  267. basic_examples/vector_scal_opencl_kernel.cl
  268. endif
  269. if STARPU_HAVE_F77_H
  270. basic_examples_vector_scal_fortran_SOURCES = \
  271. basic_examples/vector_scal_fortran.F \
  272. basic_examples/vector_scal_c.c \
  273. basic_examples/vector_scal_cpu.c
  274. if STARPU_USE_CUDA
  275. basic_examples_vector_scal_fortran_SOURCES += \
  276. basic_examples/vector_scal_cuda.cu
  277. basic_examples_vector_scal_fortran_LDADD = \
  278. $(STARPU_CUDA_FORTRAN_LDFLAGS)
  279. endif
  280. endif
  281. #######################
  282. # Multiformat example #
  283. #######################
  284. basic_examples_multiformat_SOURCES = \
  285. basic_examples/multiformat.c \
  286. basic_examples/multiformat_conversion_codelets.c
  287. if STARPU_USE_CUDA
  288. basic_examples_multiformat_SOURCES+= \
  289. basic_examples/multiformat_cuda.cu \
  290. basic_examples/multiformat_conversion_codelets_cuda.cu
  291. endif
  292. if STARPU_USE_OPENCL
  293. basic_examples_multiformat_SOURCES+= \
  294. basic_examples/multiformat_opencl.c \
  295. basic_examples/multiformat_conversion_codelets_opencl.c
  296. nobase_STARPU_OPENCL_DATA_DATA+= \
  297. basic_examples/multiformat_opencl_kernel.cl \
  298. basic_examples/multiformat_conversion_codelets_opencl_kernel.cl
  299. endif
  300. #################
  301. # block example #
  302. #################
  303. basic_examples_block_SOURCES = \
  304. basic_examples/block.c \
  305. basic_examples/block_cpu.c
  306. if STARPU_USE_CUDA
  307. basic_examples_block_SOURCES += \
  308. basic_examples/block_cuda.cu
  309. endif
  310. if STARPU_USE_OPENCL
  311. basic_examples_block_SOURCES += \
  312. basic_examples/block_opencl.c
  313. nobase_STARPU_OPENCL_DATA_DATA += \
  314. basic_examples/block_opencl_kernel.cl
  315. endif
  316. ####################
  317. # Variable example #
  318. ####################
  319. basic_examples_variable_SOURCES = \
  320. basic_examples/variable.c \
  321. basic_examples/variable_kernels_cpu.c
  322. if STARPU_USE_CUDA
  323. basic_examples_variable_SOURCES += \
  324. basic_examples/variable_kernels.cu
  325. endif
  326. if STARPU_USE_OPENCL
  327. basic_examples_variable_SOURCES += \
  328. basic_examples/variable_kernels_opencl.c
  329. nobase_STARPU_OPENCL_DATA_DATA += \
  330. basic_examples/variable_kernels_opencl_kernel.cl
  331. endif
  332. ###########
  333. # Filters #
  334. ###########
  335. filters_fblock_SOURCES = \
  336. filters/fblock.c \
  337. filters/fblock_cpu.c
  338. if STARPU_USE_CUDA
  339. filters_fblock_SOURCES += \
  340. filters/fblock_cuda.cu
  341. endif
  342. if STARPU_USE_OPENCL
  343. filters_fblock_SOURCES += \
  344. filters/fblock_opencl.c
  345. nobase_STARPU_OPENCL_DATA_DATA += \
  346. filters/fblock_opencl_kernel.cl
  347. endif
  348. #############################
  349. # Custom multiformat filter #
  350. #############################
  351. filters_custom_mf_custom_mf_filter_SOURCES=\
  352. filters/custom_mf/custom_mf_filter.c \
  353. filters/custom_mf/custom_interface.c \
  354. filters/custom_mf/custom_conversion_codelets.c
  355. if STARPU_USE_CUDA
  356. filters_custom_mf_custom_mf_filter_SOURCES+=\
  357. filters/custom_mf/conversion.cu \
  358. filters/custom_mf/cuda.cu
  359. endif
  360. if STARPU_USE_OPENCL
  361. filters_custom_mf_custom_mf_filter_SOURCES+=\
  362. filters/custom_mf/conversion_opencl.c \
  363. filters/custom_mf/custom_opencl.c
  364. nobase_STARPU_OPENCL_DATA_DATA += \
  365. filters/custom_mf/conversion_opencl.cl \
  366. filters/custom_mf/custom_opencl.cl
  367. endif
  368. ################
  369. # AXPY example #
  370. ################
  371. if !NO_BLAS_LIB
  372. axpy_axpy_SOURCES = \
  373. axpy/axpy.c \
  374. common/blas.c
  375. axpy_axpy_LDADD = \
  376. $(STARPU_BLAS_LDFLAGS)
  377. endif
  378. ################
  379. # Mult example #
  380. ################
  381. if !NO_BLAS_LIB
  382. mult_sgemm_SOURCES = \
  383. mult/sgemm.c \
  384. common/blas.c
  385. mult_sgemm_LDADD = \
  386. $(STARPU_BLAS_LDFLAGS)
  387. mult_dgemm_SOURCES = \
  388. mult/dgemm.c \
  389. common/blas.c
  390. mult_dgemm_LDADD = \
  391. $(STARPU_BLAS_LDFLAGS)
  392. endif
  393. ####################
  394. # Cholesky example #
  395. ####################
  396. if !NO_BLAS_LIB
  397. cholesky_cholesky_tag_SOURCES = \
  398. cholesky/cholesky_tag.c \
  399. cholesky/cholesky_models.c \
  400. cholesky/cholesky_kernels.c \
  401. common/blas.c
  402. cholesky_cholesky_tag_LDADD = \
  403. $(STARPU_BLAS_LDFLAGS)
  404. cholesky_cholesky_tile_tag_SOURCES = \
  405. cholesky/cholesky_tile_tag.c \
  406. cholesky/cholesky_models.c \
  407. cholesky/cholesky_kernels.c \
  408. common/blas.c
  409. cholesky_cholesky_tile_tag_LDADD = \
  410. $(STARPU_BLAS_LDFLAGS)
  411. cholesky_cholesky_grain_tag_SOURCES = \
  412. cholesky/cholesky_grain_tag.c \
  413. cholesky/cholesky_models.c \
  414. cholesky/cholesky_kernels.c \
  415. common/blas.c
  416. cholesky_cholesky_grain_tag_LDADD = \
  417. $(STARPU_BLAS_LDFLAGS)
  418. cholesky_cholesky_implicit_SOURCES = \
  419. cholesky/cholesky_implicit.c \
  420. cholesky/cholesky_models.c \
  421. cholesky/cholesky_kernels.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. ######
  620. # Pi #
  621. ######
  622. check_PROGRAMS += \
  623. pi/pi \
  624. pi/pi_redux
  625. examplebin_PROGRAMS += \
  626. pi/pi \
  627. pi/pi_redux
  628. pi_pi_SOURCES = \
  629. pi/pi.c \
  630. pi/SobolQRNG/sobol_gold.c \
  631. pi/SobolQRNG/sobol_primitives.c
  632. if STARPU_USE_CUDA
  633. pi_pi_SOURCES += \
  634. pi/pi_kernel.cu \
  635. pi/SobolQRNG/sobol_gpu.cu
  636. endif
  637. pi_pi_redux_SOURCES = \
  638. pi/pi_redux.c
  639. if STARPU_USE_CUDA
  640. pi_pi_redux_SOURCES += \
  641. pi/pi_redux_kernel.cu
  642. pi_pi_redux_LDADD = \
  643. $(STARPU_CURAND_LDFLAGS)
  644. endif
  645. showcheck:
  646. -cat $(TEST_LOGS) /dev/null
  647. for i in $(SUBDIRS) ; do \
  648. make -C $$i showcheck ; \
  649. done