Update Kokkos library to v2.03.13

This commit is contained in:
Stan Moore
2017-07-31 10:34:21 -06:00
parent 6d0a228624
commit 13f2d39f55
171 changed files with 44039 additions and 2807 deletions

View File

@ -69,12 +69,26 @@ int main()
#if defined( KOKKOS_ENABLE_OPENMP )
{
// Use 4 cores per NUMA region, unless fewer available
const unsigned use_numa_count = Kokkos::hwloc::get_available_numa_count();
const unsigned use_cores_per_numa = std::min( 4u , Kokkos::hwloc::get_available_cores_per_numa() );
int num_threads = 0;
if ( Kokkos::hwloc::available() ) {
// Use 4 cores per NUMA region, unless fewer available
const unsigned use_numa_count = Kokkos::hwloc::get_available_numa_count();
const unsigned use_cores_per_numa = std::min( 4u , Kokkos::hwloc::get_available_cores_per_numa() );
num_threads = use_numa_count * use_cores_per_numa;
Kokkos::OpenMP::initialize( use_numa_count * use_cores_per_numa );
}
else {
#pragma omp parallel
{
#pragma omp atomic
++num_threads;
}
num_threads = std::max(4, num_threads/4);
}
Kokkos::OpenMP::initialize( num_threads );
std::cout << "feint< OpenMP , NotUsingAtomic >" << std::endl ;
Kokkos::Example::feint< Kokkos::OpenMP , false >();