Commit aa8a40f6 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Merge branch 'matrices-gpu' of geraldine.fjfi.cvut.cz:/local/projects/tnl/tnl into matrices-gpu

parents 10309a46 c6240ef5
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ if( WITH_TEMPLATE_EXPLICIT_INSTANTIATION STREQUAL "yes" )
endif()   

if( WITH_CUDA STREQUAL "yes" )
   AddCompilerFlag( "-DHAVE_NOT_CXX11 -U_GLIBCXX_ATOMIC_BUILTINS -U_GLIBCXX_USE_INT128 -shared" )
   AddCompilerFlag( "-DHAVE_NOT_CXX11 -U_GLIBCXX_ATOMIC_BUILTINS -U_GLIBCXX_USE_INT128" )
else()
   AddCompilerFlag( "-std=gnu++0x" )
endif()      
@@ -49,9 +49,8 @@ if( NOT WITH_CUDA STREQUAL "no" )
        set(BUILD_SHARED_LIBS ON)
        set(CUDA_SEPARABLE_COMPILATION ON)
        
        set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-DHAVE_CUDA;--compiler-options '-fPIC','-shared')
        set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-DHAVE_CUDA)
        if( CUDA_ARCHITECTURE STREQUAL "2.0" )
            #set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-arch sm_20;-DCUDA_ARCH=20)
            set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-DCUDA_ARCH=20)            
        endif()    
        if( CUDA_ARCHITECTURE STREQUAL "2.1" )
+3 −5
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ set( tnl_CUDA__SOURCES ${tnl_generators_CUDA__SOURCES}
                 
if( BUILD_CUDA )
   CUDA_ADD_LIBRARY( tnl${debugExt}-${tnlVersion} SHARED ${tnl_CUDA__SOURCES}
                                                  OPTIONS -arch sm_20 -shared --compiler-options '-fPIC','-shared' )
                                                  OPTIONS -arch sm_20 -shared )
else( BUILD_CUDA )
   ADD_LIBRARY( tnl${debugExt}-${tnlVersion} SHARED 
                ${tnl_SOURCES} )
@@ -39,16 +39,14 @@ endif( BUILD_CUDA )
SET_TARGET_PROPERTIES( tnl${debugExt}-${tnlVersion} PROPERTIES 
                          SOVERSION 0 
                          VERSION ${tnlVersion} )
TARGET_LINK_LIBRARIES( tnl${debugExt}-${tnlVersion}  
                          ${BZIP2_LIBRARIES} )

INSTALL( TARGETS tnl${debugExt}-${tnlVersion} DESTINATION lib )

IF( BUILD_MPI )
   
   if( BUILD_CUDA )
      CUDA_ADD_LIBRARY( tnl-mpi${debugExt}-${tnlVersion} SHARED ${tnl_CUDA__SOURCES} 
                                                         OPTIONS -arch sm_20 -shared --compiler-options '-fPIC','-shared' )
#-arch sm_20 -shared --linker-options '-fPIC','-shared'                                                         
                                                         OPTIONS -arch sm_20 -shared )
   else( BUILD_CUDA )
         ADD_LIBRARY( tnl-mpi${debugExt}-${tnlVersion} SHARED
                      ${tnl_SOURCES} )  
+2 −3
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@

#include <core/mfuncs.h>
#include <core/tnlAssert.h>
#include <legacy/core/tnlCudaSupport.h>
#include <core/tnlString.h>
#include <core/tnlObject.h>
#include <core/tnlHost.h>
@@ -211,7 +210,7 @@ bool tnlFile :: read( Type* buffer,
         {
            cerr << "Transfer of data from the CUDA device to the file " << this -> fileName
                 << " failed." << endl;
            checkCUDAError( __FILE__, __LINE__ );
            checkCudaDevice;
            free( host_buffer );
            return false;
         }
@@ -288,7 +287,7 @@ bool tnlFile :: write( const Type* buffer,
                            transfer * sizeof( Type ),
                            cudaMemcpyDeviceToHost ) != cudaSuccess )
            {
               checkCUDAError( __FILE__, __LINE__ );
               checkCudaDevice;
               cerr << "CUDA error." << endl;
               free( host_buffer );
               return false;
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#ifndef TNLARRAYOPERATIONSHOST_IMPL_H_
#define TNLARRAYOPERATIONSHOST_IMPL_H_
#include <tnlConfig.h>
#include <core/tnlCuda.h>
#include <string.h>

template< typename Element, typename Index >