Commit 8f0daede authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Merge branch 'header-only' into 'develop'

Header only

See merge request !22
parents 632087b6 d289751f
Loading
Loading
Loading
Loading
+5 −60
Original line number Diff line number Diff line
@@ -249,33 +249,20 @@ endif()

find_package( DCMTK )
if( DCMTK_FOUND )
   set( HAVE_DCMTK_H "#define HAVE_DCMTK_H 1" )
   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_DCMTK_H" )
   include_directories( ${DCMTK_INCLUDE_DIRS} )
   set( HAVE_DCMTK TRUE)
   set( DCMTK_LD_FLAGS "" )
   foreach( arg ${DCMTK_LIBRARIES} )
      set( DCMTK_LD_FLAGS "${DCMTK_LD_FLAGS} ${arg}" )
   endforeach( arg ${DCMTK_LIBRARIES} )
else()
   set( HAVE_DCMTK_H "//#define HAVE_DCMTK_H 1" )
endif()

find_package( PNG )
if( PNG_FOUND )
   set( HAVE_PNG_H "#define HAVE_PNG_H 1" )
   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_PNG_H" )
   include_directories( ${PNG_INCLUDE_DIRS} )
else()
   set( HAVE_PNG_H "//#define HAVE_PNG_H 1" )
   set( PNG_LIBRARIES "" )
endif()

find_package( JPEG )
if( JPEG_FOUND )
   set( HAVE_JPEG_H "#define HAVE_JPEG_H 1" )
   set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_JPEG_H" )
   include_directories( ${JPEG_INCLUDE_DIRS} )
else()
   set( HAVE_JPEG_H "//#define HAVE_JPEG_H 1" )
   set( JPEG_LIBRARIES "" )
endif()

####
@@ -309,45 +296,6 @@ if( ${WITH_GMP} )
   endif()
endif()

####
# Check for some system header
#
find_path( SYS_TIME_INCLUDE_DIR sys/time.h  
           /usr/include/x86_64-linux-gnu
           /usr/include
           DOC "System timer headers." )
if( ${SYS_TIME_INCLUDE_DIR} STREQUAL "SYS_TIME_INCLUDE_DIR-NOTFOUND" )
    message(  "Missing header file sys/time.h" )
    set( HAVE_SYS_TIME_H "//#define HAVE_SYS_TIME_H 1" )
else()
    #include_directories( ${SYS_TIME_INCLUDE_DIR} )
    set( HAVE_SYS_TIME_H "#define HAVE_SYS_TIME_H 1" )
endif()

find_path( SYS_RESOURCE_INCLUDE_DIR sys/resource.h
           /usr/include/x86_64-linux-gnu
           /usr/include  
           DOC "System resources headers." )
if( ${SYS_RESOURCE_INCLUDE_DIR} STREQUAL "SYS_RESOURCE_INCLUDE_DIR-NOTFOUND" )
    message( "Missing header file sys/time.h" )
    set( HAVE_SYS_RESOURCE_H "//#define HAVE_SYS_RESOURCE_H 1" )
else()
    #include_directories( ${SYS_RESOURCE_INCLUDE_DIR} )
    set( HAVE_SYS_RESOURCE_H "#define HAVE_SYS_RESOURCE_H 1" )
endif()

find_path( SYS_IOCTL_INCLUDE_DIR sys/ioctl.h
           /usr/include/x86_64-linux-gnu
           /usr/include  
           DOC "System ioctl headers." )
if( ${SYS_IOCTL_INCLUDE_DIR} STREQUAL "SYS_IOCTL_INCLUDE_DIR-NOTFOUND" )
    message( "Missing header file sys/time.h" )
    set( HAVE_SYS_IOCTL_H "//#define HAVE_SYS_IOCTL_H 1" )
else()
    #include_directories( ${SYS_IOCTL_INCLUDE_DIR} )
    set( HAVE_SYS_IOCTL_H "#define HAVE_SYS_IOCTL_H 1" )
endif()

if( ${WITH_TESTS} )
   enable_testing()

@@ -412,9 +360,6 @@ endif()
#   endif()
#endif()

CONFIGURE_FILE( "tnlConfig.h.in" "${PROJECT_BUILD_PATH}/TNL/tnlConfig.h" )
INSTALL( FILES ${PROJECT_BUILD_PATH}/TNL/tnlConfig.h DESTINATION ${TNL_TARGET_INCLUDE_DIRECTORY} )

#Nastavime cesty k hlavickovym souborum a knihovnam
INCLUDE_DIRECTORIES( src )
INCLUDE_DIRECTORIES( ${PROJECT_BUILD_PATH} )
+0 −2
Original line number Diff line number Diff line
if( BUILD_CUDA )
    CUDA_ADD_EXECUTABLE( tnl-benchmark-blas tnl-benchmark-blas.cu )
    CUDA_ADD_CUBLAS_TO_TARGET( tnl-benchmark-blas )
    TARGET_LINK_LIBRARIES( tnl-benchmark-blas tnl )
else()
    ADD_EXECUTABLE( tnl-benchmark-blas tnl-benchmark-blas.cpp )
    TARGET_LINK_LIBRARIES( tnl-benchmark-blas tnl )
endif()

install( TARGETS tnl-benchmark-blas RUNTIME DESTINATION bin )
+1 −3
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@

#include "../Benchmarks.h"

#include <TNL/Containers/List.h>
#include <TNL/Pointers/DevicePointer.h>
#include <TNL/Matrices/CSR.h>
#include <TNL/Matrices/Ellpack.h>
@@ -111,8 +110,7 @@ benchmarkSpMV( Benchmark & benchmark,
   CudaVector deviceVector, deviceVector2;

   // create benchmark group
   Containers::List< String > parsedType;
   parseObjectType( HostMatrix::getType(), parsedType );
   const std::vector< String > parsedType = parseObjectType( HostMatrix::getType() );
#ifdef HAVE_CUDA
   benchmark.createHorizontalGroup( parsedType[ 0 ], 2 );
#else
+5 −5
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ runBlasBenchmarks( Benchmark & benchmark,
                   const std::size_t & minSize,
                   const std::size_t & maxSize,
                   const double & sizeStepFactor,
                   const unsigned & elementsPerRow )
                   const int & elementsPerRow )
{
   const String precision = getType< Real >();
   metadata["precision"] = precision;
@@ -121,10 +121,10 @@ main( int argc, char* argv[] )
//   const std::size_t maxSize = parameters.getParameter< std::size_t >( "max-size" );
   const std::size_t minSize = parameters.getParameter< int >( "min-size" );
   const std::size_t maxSize = parameters.getParameter< int >( "max-size" );
   const unsigned sizeStepFactor = parameters.getParameter< unsigned >( "size-step-factor" );
   const unsigned loops = parameters.getParameter< unsigned >( "loops" );
   const unsigned elementsPerRow = parameters.getParameter< unsigned >( "elements-per-row" );
   const unsigned verbose = parameters.getParameter< unsigned >( "verbose" );
   const int sizeStepFactor = parameters.getParameter< int >( "size-step-factor" );
   const int loops = parameters.getParameter< int >( "loops" );
   const int elementsPerRow = parameters.getParameter< int >( "elements-per-row" );
   const int verbose = parameters.getParameter< int >( "verbose" );

   if( sizeStepFactor <= 1 ) {
       std::cerr << "The value of --size-step-factor must be greater than 1." << std::endl;
+0 −2
Original line number Diff line number Diff line
if( BUILD_CUDA )
   cuda_add_executable( tnl-benchmark-distributed-spmv-cuda tnl-benchmark-distributed-spmv.cu )
   target_link_libraries( tnl-benchmark-distributed-spmv-cuda tnl )

   install( TARGETS tnl-benchmark-distributed-spmv-cuda RUNTIME DESTINATION bin )
endif()

add_executable( tnl-benchmark-distributed-spmv tnl-benchmark-distributed-spmv.cpp )
target_link_libraries( tnl-benchmark-distributed-spmv tnl )

install( TARGETS tnl-benchmark-distributed-spmv RUNTIME DESTINATION bin )
Loading