/perf/kseta

To get this branch, use:
bzr branch http://darksoft.org/webbzr/perf/kseta

« back to all changes in this revision

Viewing changes to sources/mm/CMakeLists.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2013-09-30 06:47:09 UTC
  • Revision ID: csa@dside.dyndns.org-20130930064709-55cde0k5ci76t8z5
Simple matrix multiplication

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
add_executable(simple mm.c simple.c)
 
2
 
 
3
set(INCS "")
 
4
 
 
5
if (MKL_FOUND)
 
6
    add_executable(mkl mm.c mkl.c)
 
7
    add_definitions(-I${MKL_INCLUDE_DIR})
 
8
    target_link_libraries(mkl ${MKL_LP_LIBRARY} ${MKL_INTELTHREAD_LIBRARY} ${MKL_CORE_LIBRARY} ${MKL_LP_SEQUENTIAL_LIBRARIES} ${MKL_IOMP5_LIBRARY}) 
 
9
    set_target_properties(mkl PROPERTIES LINK_FLAGS "-pthread")
 
10
endif()
 
11
 
 
12
if (OPENCL_FOUND)
 
13
    add_executable(opencl mm.c opencl.c)
 
14
    set(INCS ${INCS} ${OPENCL_INCLUDE_DIRS})
 
15
    target_link_libraries(opencl ${OPENCL_LIBRARIES})
 
16
 
 
17
    add_executable(opencl3 mm.c opencl.c)
 
18
    set_target_properties(opencl3 PROPERTIES COMPILE_DEFINITIONS "PPT=4;SHMEM=16")
 
19
    target_link_libraries(opencl3 ${OPENCL_LIBRARIES})
 
20
 
 
21
    add_executable(opencl5 mm.c opencl.c)
 
22
    set_target_properties(opencl5 PROPERTIES COMPILE_DEFINITIONS "PPT=6;SHMEM=6")
 
23
    target_link_libraries(opencl5 ${OPENCL_LIBRARIES})
 
24
 
 
25
    add_executable(opencl51 mm.c opencl51.c)
 
26
    set_target_properties(opencl51 PROPERTIES COMPILE_DEFINITIONS "PPT=5;SHMEM=5")
 
27
    target_link_libraries(opencl51 ${OPENCL_LIBRARIES})
 
28
 
 
29
    add_executable(opencl6 mm.c opencl6.c)
 
30
    set_target_properties(opencl6 PROPERTIES COMPILE_DEFINITIONS "PPT=6;SHMEM=6")
 
31
    target_link_libraries(opencl6 ${OPENCL_LIBRARIES})
 
32
 
 
33
    add_executable(opencl7 mm.c opencl7.c)
 
34
    set_target_properties(opencl7 PROPERTIES COMPILE_DEFINITIONS "PPT=6;SHMEM=6")
 
35
    target_link_libraries(opencl7 ${OPENCL_LIBRARIES})
 
36
 
 
37
    add_executable(opencl71 mm.c opencl71.c)
 
38
    set_target_properties(opencl71 PROPERTIES COMPILE_DEFINITIONS "PPT=6;SHMEM=6")
 
39
    target_link_libraries(opencl71 ${OPENCL_LIBRARIES})
 
40
 
 
41
    add_executable(opencl8 mm.c opencl8.c)
 
42
    set_target_properties(opencl8 PROPERTIES COMPILE_DEFINITIONS "PPT=6;SHMEM=6")
 
43
    target_link_libraries(opencl8 ${OPENCL_LIBRARIES})
 
44
endif()
 
45
 
 
46
if (OPENCL_FOUND AND ATI_OPENCL_LIBRARY AND APPML_FOUND)
 
47
    add_executable(amdblas mm.c amdblas.c)
 
48
    set(INCS ${INCS} ${APPML_INCLUDE_DIRS})
 
49
#    set_target_properties(amdblas PROPERTIES INCLUDE_DIRECTORIES "${OPENCL_INCLUDE_DIRS} ${APPML_INCLUDE_DIRS}")
 
50
    target_link_libraries(amdblas ${ATI_OPENCL_LIBRARY} ${APPML_LIBRARY})
 
51
endif()
 
52
 
 
53
include_directories(${INCS})