Merge remote-tracking branch 'origin/master' into mscg
This commit is contained in:
@ -2,9 +2,9 @@
|
||||
# CMake build system
|
||||
# This file is part of LAMMPS
|
||||
# Created by Christoph Junghans and Richard Berger
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(lammps LANGUAGES CXX)
|
||||
project(lammps CXX)
|
||||
set(SOVERSION 0)
|
||||
set(LAMMPS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src)
|
||||
set(LAMMPS_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
|
||||
@ -129,7 +129,7 @@ foreach(PKG ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
|
||||
endforeach()
|
||||
|
||||
macro(pkg_depends PKG1 PKG2)
|
||||
if(PKG_${PKG1} AND NOT PKG_${PKG2})
|
||||
if(PKG_${PKG1} AND NOT (PKG_${PKG2} OR BUILD_${PKG2}))
|
||||
message(FATAL_ERROR "${PKG1} package needs LAMMPS to be build with ${PKG2}")
|
||||
endif()
|
||||
endmacro()
|
||||
@ -137,29 +137,23 @@ endmacro()
|
||||
pkg_depends(MPIIO MPI)
|
||||
pkg_depends(QEQ MANYBODY)
|
||||
pkg_depends(USER-ATC MANYBODY)
|
||||
pkg_depends(USER-H5MD MPI)
|
||||
pkg_depends(USER-LB MPI)
|
||||
pkg_depends(USER-MISC MANYBODY)
|
||||
pkg_depends(USER-PHONON KSPACE)
|
||||
pkg_depends(CORESHELL KSPACE)
|
||||
|
||||
######################################################
|
||||
# packages with special compiler needs or external libs
|
||||
######################################################
|
||||
if(PKG_REAX OR PKG_MEAM OR PKG_USER-QUIP OR PKG_USER-QMMM OR PKG_LATTE)
|
||||
enable_language(Fortran)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(PKG_MEAM)
|
||||
if(PKG_MEAM OR PKG_USER-H5MD OR PKG_USER-QMMM)
|
||||
enable_language(C)
|
||||
endif()
|
||||
|
||||
if(PKG_KOKKOS)
|
||||
# starting with CMake 3.1 this is all you have to do to enforce C++11
|
||||
set(CMAKE_CXX_STANDARD 11) # C++11...
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
|
||||
endif()
|
||||
|
||||
find_package(OpenMP QUIET)
|
||||
option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND})
|
||||
if(BUILD_OMP OR PKG_USER-OMP OR PKG_KOKKOS OR PKG_USER-INTEL)
|
||||
@ -312,7 +306,7 @@ if(PKG_LATTE)
|
||||
message(FATAL_ERROR "LATTE not found, help CMake to find it by setting LATTE_LIBRARY, or set DOWNLOAD_LATTE=ON to download it")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(PKG_USER-MOLFILE)
|
||||
@ -352,14 +346,14 @@ endif()
|
||||
|
||||
if(PKG_USER-QUIP)
|
||||
find_package(QUIP REQUIRED)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QUIP_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QUIP_LIBRARIES} ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(PKG_USER-QMMM)
|
||||
message(WARNING "Building QMMM with CMake is still experimental")
|
||||
find_package(QE REQUIRED)
|
||||
include_directories(${QE_INCLUDE_DIRS})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QE_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${QE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(PKG_USER-VTK)
|
||||
@ -664,6 +658,9 @@ if(PKG_USER-INTEL)
|
||||
endif()
|
||||
|
||||
if(PKG_GPU)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||
message(FATAL_ERROR "For the GPU package you need at least cmake-3.1")
|
||||
endif()
|
||||
set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU)
|
||||
set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
|
||||
${GPU_SOURCES_DIR}/fix_gpu.h
|
||||
|
||||
@ -95,9 +95,9 @@ This pair style can only be used via the {pair} keyword of the
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
This pair style is part of the USER-MISC package. It is only enabled
|
||||
if LAMMPS was built with that package. See
|
||||
the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
This pair style is part of the MANYBODY package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
This pair style requires the "newton"_newton.html setting to be "on"
|
||||
for pair interactions.
|
||||
@ -117,4 +117,5 @@ appropriate units if your simulation doesn't use "metal" units.
|
||||
:line
|
||||
|
||||
:link(Gao)
|
||||
[(Gao)] Gao and Weber, Nuclear Instruments and Methods in Physics Research B 191 (2012) 504.
|
||||
[(Gao)] Gao and Weber, Nuclear Instruments and Methods in Physics
|
||||
Research B 191 (2012) 504.
|
||||
|
||||
@ -47,13 +47,14 @@ the "(Aktulga)"_#Aktulga paper. The {reax/c} style was initially
|
||||
implemented as a stand-alone C code and is now integrated into LAMMPS
|
||||
as a package.
|
||||
|
||||
The {reax/c/kk} style is a Kokkos version of the ReaxFF potential that is
|
||||
derived from the {reax/c} style. The Kokkos version can run on GPUs and
|
||||
can also use OpenMP multithreading. For more information about the Kokkos package,
|
||||
see "Section 4"_Section_packages.html#kokkos and "Section 5.3.3"_accelerate_kokkos.html.
|
||||
One important consideration when using the {reax/c/kk} style is the choice of either
|
||||
half or full neighbor lists. This setting can be changed using the Kokkos "package"_package.html
|
||||
command.
|
||||
The {reax/c/kk} style is a Kokkos version of the ReaxFF potential that
|
||||
is derived from the {reax/c} style. The Kokkos version can run on GPUs
|
||||
and can also use OpenMP multithreading. For more information about the
|
||||
Kokkos package, see "Section 4"_Section_packages.html#kokkos and
|
||||
"Section 5.3.3"_accelerate_kokkos.html. One important consideration
|
||||
when using the {reax/c/kk} style is the choice of either half or full
|
||||
neighbor lists. This setting can be changed using the Kokkos
|
||||
"package"_package.html command.
|
||||
|
||||
The {reax/c} style differs from the "pair_style reax"_pair_reax.html
|
||||
command in the lo-level implementation details. The {reax} style is a
|
||||
@ -80,9 +81,8 @@ parameterizations for different classes of materials. You can submit
|
||||
a contact request at the Materials Computation Center (MCC) website
|
||||
"https://www.mri.psu.edu/materials-computation-center/connect-mcc"_https://www.mri.psu.edu/materials-computation-center/connect-mcc,
|
||||
describing the material(s) you are interested in modeling with ReaxFF.
|
||||
They can tell
|
||||
you what is currently available or what it would take to create a
|
||||
suitable ReaxFF parameterization.
|
||||
They can tell you what is currently available or what it would take to
|
||||
create a suitable ReaxFF parameterization.
|
||||
|
||||
The {cfile} setting can be specified as NULL, in which case default
|
||||
settings are used. A control file can be specified which defines
|
||||
@ -120,28 +120,31 @@ assign to each atom will be used for computing the electrostatic
|
||||
interactions in the system.
|
||||
See the "fix qeq/reax"_fix_qeq_reax.html command for details.
|
||||
|
||||
Using the optional keyword {lgvdw} with the value {yes} turns on
|
||||
the low-gradient correction of the ReaxFF/C for long-range
|
||||
London Dispersion, as described in the "(Liu)"_#Liu_2011 paper. Force field
|
||||
Using the optional keyword {lgvdw} with the value {yes} turns on the
|
||||
low-gradient correction of the ReaxFF/C for long-range London
|
||||
Dispersion, as described in the "(Liu)"_#Liu_2011 paper. Force field
|
||||
file {ffield.reax.lg} is designed for this correction, and is trained
|
||||
for several energetic materials (see "Liu"). When using lg-correction,
|
||||
recommended value for parameter {thb} is 0.01, which can be set in the
|
||||
control file. Note: Force field files are different for the original
|
||||
or lg corrected pair styles, using wrong ffield file generates an error message.
|
||||
or lg corrected pair styles, using wrong ffield file generates an
|
||||
error message.
|
||||
|
||||
Using the optional keyword {enobonds} with the value {yes}, the energy
|
||||
of atoms with no bonds (i.e. isolated atoms) is included in the total
|
||||
potential energy and the per-atom energy of that atom. If the value
|
||||
{no} is specified then the energy of atoms with no bonds is set to zero.
|
||||
The latter behavior is usual not desired, as it causes discontinuities
|
||||
in the potential energy when the bonding of an atom drops to zero.
|
||||
{no} is specified then the energy of atoms with no bonds is set to
|
||||
zero. The latter behavior is usual not desired, as it causes
|
||||
discontinuities in the potential energy when the bonding of an atom
|
||||
drops to zero.
|
||||
|
||||
Optional keywords {safezone} and {mincap} are used for allocating
|
||||
reax/c arrays. Increasing these values can avoid memory problems, such
|
||||
as segmentation faults and bondchk failed errors, that could occur under
|
||||
certain conditions. These keywords aren't used by the Kokkos version, which
|
||||
instead uses a more robust memory allocation scheme that checks if the sizes of
|
||||
the arrays have been exceeded and automatically allocates more memory.
|
||||
reax/c arrays. Increasing these values can avoid memory problems,
|
||||
such as segmentation faults and bondchk failed errors, that could
|
||||
occur under certain conditions. These keywords aren't used by the
|
||||
Kokkos version, which instead uses a more robust memory allocation
|
||||
scheme that checks if the sizes of the arrays have been exceeded and
|
||||
automatically allocates more memory.
|
||||
|
||||
The thermo variable {evdwl} stores the sum of all the ReaxFF potential
|
||||
energy contributions, with the exception of the Coulombic and charge
|
||||
@ -153,7 +156,8 @@ This pair style tallies a breakdown of the total ReaxFF potential
|
||||
energy into sub-categories, which can be accessed via the "compute
|
||||
pair"_compute_pair.html command as a vector of values of length 14.
|
||||
The 14 values correspond to the following sub-categories (the variable
|
||||
names in italics match those used in the original FORTRAN ReaxFF code):
|
||||
names in italics match those used in the original FORTRAN ReaxFF
|
||||
code):
|
||||
|
||||
{eb} = bond energy
|
||||
{ea} = atom energy
|
||||
@ -340,8 +344,8 @@ reax"_pair_reax.html
|
||||
|
||||
[Default:]
|
||||
|
||||
The keyword defaults are checkqeq = yes, enobonds = yes, lgvdw = no, safezone = 1.2,
|
||||
mincap = 50.
|
||||
The keyword defaults are checkqeq = yes, enobonds = yes, lgvdw = no,
|
||||
safezone = 1.2, mincap = 50.
|
||||
|
||||
:line
|
||||
|
||||
|
||||
@ -192,8 +192,8 @@ This pair style can only be used via the {pair} keyword of the
|
||||
[Restrictions:]
|
||||
|
||||
This pair style is part of the MANYBODY package. It is only enabled
|
||||
if LAMMPS was built with that package. See
|
||||
the "Making LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
if LAMMPS was built with that package. See the "Making
|
||||
LAMMPS"_Section_start.html#start_3 section for more info.
|
||||
|
||||
This pair style requires the "newton"_newton.html setting to be "on"
|
||||
for pair interactions.
|
||||
|
||||
@ -6,10 +6,10 @@
|
||||
// in.lammps = LAMMPS input script
|
||||
// in.quest = Quest input script
|
||||
|
||||
#include "mpi.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "stdint.h"
|
||||
|
||||
#include "many2one.h"
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
// Sfactor = multiplier on strain effect
|
||||
// in.spparks = SPPARKS input script
|
||||
|
||||
#include "mpi.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "lammps_data_write.h"
|
||||
#include "many2many.h"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <mpi.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include "error.h"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include "files.h"
|
||||
|
||||
#define MAXLINE 256
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "irregular.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <mpi.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "lammps_data_write.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef LAMMPS_DATA_WRITE_H
|
||||
#define LAMMPS_DATA_WRITE_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include "send2one.h"
|
||||
|
||||
class LAMMPSDataWrite : public Send2One {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <mpi.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include "many2many.h"
|
||||
#include "irregular.h"
|
||||
#include "memory.h"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "mpi.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include "many2one.h"
|
||||
#include "memory.h"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <mpi.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include <mpi.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include "one2many.h"
|
||||
#include "memory.h"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "mpi.h"
|
||||
#include "stdlib.h"
|
||||
#include "stdio.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include "send2one.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
@ -23,10 +23,10 @@
|
||||
// Tdelta = incremental temperature for each of N runs
|
||||
// See README for compilation instructions
|
||||
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "mpi.h"
|
||||
#include <mpi.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "lammps.h" // these are LAMMPS include files
|
||||
#include "input.h"
|
||||
|
||||
@ -19,15 +19,16 @@
|
||||
// in.lammps = LAMMPS input script
|
||||
// See README for compilation instructions
|
||||
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "mpi.h"
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <mpi.h>
|
||||
|
||||
#include "lammps.h" // these are LAMMPS include files
|
||||
#include "input.h"
|
||||
#include "atom.h"
|
||||
#include "library.h"
|
||||
// these are LAMMPS include files
|
||||
#include <lammps/lammps.h>
|
||||
#include <lammps/input.h>
|
||||
#include <lammps/atom.h>
|
||||
#include <lammps/library.h>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
||||
@ -63,11 +63,11 @@ namespace ATC {
|
||||
int narg = nargs -1;
|
||||
#ifdef _WIN32
|
||||
double *dargs = (double *) _alloca(sizeof(double) * narg);
|
||||
#endif
|
||||
#else
|
||||
double *dargs = (double *) alloca(sizeof(double) * narg);
|
||||
#endif
|
||||
for (int i = 0; i < narg; ++i) dargs[i] = atof(args[i+1]);
|
||||
|
||||
|
||||
return function(type, narg, dargs);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,58 @@
|
||||
# Change Log
|
||||
|
||||
## [2.7.00](https://github.com/kokkos/kokkos/tree/2.7.00) (2018-05-24)
|
||||
[Full Changelog](https://github.com/kokkos/kokkos/compare/2.6.00...2.7.00)
|
||||
|
||||
**Part of the Kokkos C++ Performance Portability Programming EcoSystem 2.7**
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- Deprecate team\_size auto adjusting to maximal value possible [\#1618](https://github.com/kokkos/kokkos/issues/1618)
|
||||
- DynamicView - remove restrictions to std::is\_trivial types and value\_type is power of two [\#1586](https://github.com/kokkos/kokkos/issues/1586)
|
||||
- Kokkos::StaticCrsGraph does not propagate memory traits \(e.g., Unmanaged\) [\#1581](https://github.com/kokkos/kokkos/issues/1581)
|
||||
- Adding ETI for DeepCopy / ViewFill etc. [\#1578](https://github.com/kokkos/kokkos/issues/1578)
|
||||
- Deprecate all the left over KOKKOS\_HAVE\_ Macros and Kokkos\_OldMacros.hpp [\#1572](https://github.com/kokkos/kokkos/issues/1572)
|
||||
- Error if Kokkos\_ARCH set in CMake [\#1555](https://github.com/kokkos/kokkos/issues/1555)
|
||||
- Deprecate ExecSpace::initialize / ExecSpace::finalize [\#1532](https://github.com/kokkos/kokkos/issues/1532)
|
||||
- New API for TeamPolicy property setting [\#1531](https://github.com/kokkos/kokkos/issues/1531)
|
||||
- clang 6.0 + cuda debug out-of-memory test failure [\#1521](https://github.com/kokkos/kokkos/issues/1521)
|
||||
- Cuda UniqueToken interface not consistent with other backends [\#1505](https://github.com/kokkos/kokkos/issues/1505)
|
||||
- Move Reducers out of Experimental namespace [\#1494](https://github.com/kokkos/kokkos/issues/1494)
|
||||
- Provide scope guard for initialize/finalize [\#1479](https://github.com/kokkos/kokkos/issues/1479)
|
||||
- Check Kokkos::is\_initialized in SharedAllocationRecord dtor [\#1465](https://github.com/kokkos/kokkos/issues/1465)
|
||||
- Remove static list of allocations [\#1464](https://github.com/kokkos/kokkos/issues/1464)
|
||||
- Makefiles: Support single compile/link line use case [\#1402](https://github.com/kokkos/kokkos/issues/1402)
|
||||
- ThreadVectorRange with a range [\#1400](https://github.com/kokkos/kokkos/issues/1400)
|
||||
- Exclusive scan + last value API [\#1358](https://github.com/kokkos/kokkos/issues/1358)
|
||||
- Install kokkos\_generated\_settings.cmake [\#1348](https://github.com/kokkos/kokkos/issues/1348)
|
||||
- Kokkos arrays \(not views!\) don't do bounds checking in debug mode [\#1342](https://github.com/kokkos/kokkos/issues/1342)
|
||||
- Expose round-robin GPU assignment outside of initialize\(int, char\*\*\) [\#1318](https://github.com/kokkos/kokkos/issues/1318)
|
||||
- DynamicView misses use\_count and label function [\#1298](https://github.com/kokkos/kokkos/issues/1298)
|
||||
- View constructor should check arguments [\#1286](https://github.com/kokkos/kokkos/issues/1286)
|
||||
- False Positive on Oversubscription Warning [\#1207](https://github.com/kokkos/kokkos/issues/1207)
|
||||
- Allow \(require\) execution space for 1st arg of VerifyExecutionCanAccessMemorySpace [\#1192](https://github.com/kokkos/kokkos/issues/1192)
|
||||
- ROCm: Add ROCmHostPinnedSpace [\#958](https://github.com/kokkos/kokkos/issues/958)
|
||||
- power of two functions [\#656](https://github.com/kokkos/kokkos/issues/656)
|
||||
- CUDA 8 has 64bit \_\_shfl [\#361](https://github.com/kokkos/kokkos/issues/361)
|
||||
- Add TriBITS/CMake configure information about node types [\#243](https://github.com/kokkos/kokkos/issues/243)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- CUDA atomic\_fetch\_sub for doubles is hitting CAS instead of intrinsic [\#1624](https://github.com/kokkos/kokkos/issues/1624)
|
||||
- Bug: use of ballot on Volta [\#1612](https://github.com/kokkos/kokkos/issues/1612)
|
||||
- Kokkos::deep\_copy memory access failures [\#1583](https://github.com/kokkos/kokkos/issues/1583)
|
||||
- g++ -std option doubly set for cmake project [\#1548](https://github.com/kokkos/kokkos/issues/1548)
|
||||
- ViewFill for 1D Views of larger 32bit entries fails [\#1541](https://github.com/kokkos/kokkos/issues/1541)
|
||||
- CUDA Volta another warpsync bug [\#1520](https://github.com/kokkos/kokkos/issues/1520)
|
||||
- triple\_nested\_parallelism fails with KOKKOS\_DEBUG and CUDA [\#1513](https://github.com/kokkos/kokkos/issues/1513)
|
||||
- Jenkins errors in Kokkos\_SharedAlloc.cpp with debug build [\#1511](https://github.com/kokkos/kokkos/issues/1511)
|
||||
- Kokkos::Sort out-of-bounds with empty bins [\#1504](https://github.com/kokkos/kokkos/issues/1504)
|
||||
- Get rid of deprecated functions inside Kokkos [\#1484](https://github.com/kokkos/kokkos/issues/1484)
|
||||
- get\_work\_partition casts int64\_t to int, causing a seg fault [\#1481](https://github.com/kokkos/kokkos/issues/1481)
|
||||
- NVCC bug with \_\_device\_\_ on defaulted function [\#1470](https://github.com/kokkos/kokkos/issues/1470)
|
||||
- CMake example broken with CUDA backend [\#1468](https://github.com/kokkos/kokkos/issues/1468)
|
||||
|
||||
|
||||
## [2.6.00](https://github.com/kokkos/kokkos/tree/2.6.00) (2018-03-07)
|
||||
[Full Changelog](https://github.com/kokkos/kokkos/compare/2.5.00...2.6.00)
|
||||
|
||||
|
||||
@ -44,6 +44,7 @@ IF(NOT KOKKOS_HAS_TRILINOS)
|
||||
"${KOKKOS_SETTINGS} make -f ${KOKKOS_SRC_PATH}/cmake/Makefile.generate_cmake_settings CXX=${CMAKE_CXX_COMPILER} generate_build_settings")
|
||||
endif()
|
||||
include(${Kokkos_BINARY_DIR}/kokkos_generated_settings.cmake)
|
||||
install(FILES ${Kokkos_BINARY_DIR}/kokkos_generated_settings.cmake DESTINATION lib/cmake/Kokkos)
|
||||
string(REPLACE " " ";" KOKKOS_TPL_INCLUDE_DIRS "${KOKKOS_GMAKE_TPL_INCLUDE_DIRS}")
|
||||
string(REPLACE " " ";" KOKKOS_TPL_LIBRARY_DIRS "${KOKKOS_GMAKE_TPL_LIBRARY_DIRS}")
|
||||
string(REPLACE " " ";" KOKKOS_TPL_LIBRARY_NAMES "${KOKKOS_GMAKE_TPL_LIBRARY_NAMES}")
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
# Default settings common options.
|
||||
|
||||
#LAMMPS specific settings:
|
||||
KOKKOS_PATH=../../lib/kokkos
|
||||
ifndef KOKKOS_PATH
|
||||
KOKKOS_PATH=../../lib/kokkos
|
||||
endif
|
||||
CXXFLAGS=$(CCFLAGS)
|
||||
|
||||
# Options: Cuda,ROCm,OpenMP,Pthreads,Qthreads,Serial
|
||||
@ -21,8 +23,10 @@ KOKKOS_DEBUG ?= "no"
|
||||
KOKKOS_USE_TPLS ?= ""
|
||||
# Options: c++11,c++1z
|
||||
KOKKOS_CXX_STANDARD ?= "c++11"
|
||||
# Options: aggressive_vectorization,disable_profiling,disable_deprecated_code
|
||||
# Options: aggressive_vectorization,disable_profiling,disable_deprecated_code,enable_large_mem_tests
|
||||
KOKKOS_OPTIONS ?= ""
|
||||
# Option for setting ETI path
|
||||
KOKKOS_ETI_PATH ?= ${KOKKOS_PATH}/core/src/eti
|
||||
|
||||
# Default settings specific options.
|
||||
# Options: force_uvm,use_ldg,rdc,enable_lambda
|
||||
@ -51,10 +55,12 @@ KOKKOS_INTERNAL_DISABLE_PROFILING := $(call kokkos_has_string,$(KOKKOS_OPTIONS),
|
||||
KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_deprecated_code)
|
||||
KOKKOS_INTERNAL_DISABLE_DUALVIEW_MODIFY_CHECK := $(call kokkos_has_string,$(KOKKOS_OPTIONS),disable_dualview_modify_check)
|
||||
KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_PRINT := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_profile_load_print)
|
||||
KOKKOS_INTERNAL_ENABLE_LARGE_MEM_TESTS := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_large_mem_tests)
|
||||
KOKKOS_INTERNAL_CUDA_USE_LDG := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),use_ldg)
|
||||
KOKKOS_INTERNAL_CUDA_USE_UVM := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),force_uvm)
|
||||
KOKKOS_INTERNAL_CUDA_USE_RELOC := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),rdc)
|
||||
KOKKOS_INTERNAL_CUDA_USE_LAMBDA := $(call kokkos_has_string,$(KOKKOS_CUDA_OPTIONS),enable_lambda)
|
||||
KOKKOS_INTERNAL_ENABLE_ETI := $(call kokkos_has_string,$(KOKKOS_OPTIONS),enable_eti)
|
||||
|
||||
|
||||
# Check for Kokkos Host Execution Spaces one of which must be on.
|
||||
@ -78,7 +84,12 @@ KOKKOS_INTERNAL_USE_OPENMPTARGET := $(call kokkos_has_string,$(KOKKOS_DEVICES),O
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||
KOKKOS_INTERNAL_NVCC_PATH := $(shell which nvcc)
|
||||
CUDA_PATH ?= $(KOKKOS_INTERNAL_NVCC_PATH:/bin/nvcc=)
|
||||
ifeq ($(origin CUDA_PATH), undefined)
|
||||
CUDA_PATH = $(KOKKOS_INTERNAL_NVCC_PATH:/bin/nvcc=)
|
||||
endif
|
||||
ifeq ($(CUDA_PATH),)
|
||||
CUDA_PATH = $(KOKKOS_INTERNAL_NVCC_PATH:/bin/nvcc=)
|
||||
endif
|
||||
KOKKOS_INTERNAL_COMPILER_NVCC_VERSION := $(shell nvcc --version 2>&1 | grep release | cut -d' ' -f5 | cut -d',' -f1 | tr -d .)
|
||||
endif
|
||||
|
||||
@ -116,7 +127,7 @@ ifeq ($(KOKKOS_INTERNAL_COMPILER_HCC), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||
KOKKOS_INTERNAL_COMPILER_CLANG_VERSION := $(shell clang --version | grep version | cut -d ' ' -f3 | tr -d '.')
|
||||
KOKKOS_INTERNAL_COMPILER_CLANG_VERSION := $(shell $(CXX) --version | grep version | cut -d ' ' -f3 | tr -d '.')
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||
ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_CLANG_VERSION) -lt 400; echo $$?),0)
|
||||
@ -323,12 +334,13 @@ endif
|
||||
|
||||
# Generating the list of Flags.
|
||||
|
||||
KOKKOS_CPPFLAGS = -I./ -I$(KOKKOS_PATH)/core/src -I$(KOKKOS_PATH)/containers/src -I$(KOKKOS_PATH)/algorithms/src
|
||||
#CPPFLAGS is now unused
|
||||
KOKKOS_CPPFLAGS =
|
||||
KOKKOS_CXXFLAGS = -I./ -I$(KOKKOS_PATH)/core/src -I$(KOKKOS_PATH)/containers/src -I$(KOKKOS_PATH)/algorithms/src -I$(KOKKOS_ETI_PATH)
|
||||
KOKKOS_TPL_INCLUDE_DIRS =
|
||||
KOKKOS_TPL_LIBRARY_DIRS =
|
||||
KOKKOS_TPL_LIBRARY_NAMES =
|
||||
|
||||
KOKKOS_CXXFLAGS =
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_COMPILER_WARNINGS), 1)
|
||||
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_COMPILER_WARNINGS)
|
||||
endif
|
||||
@ -336,6 +348,8 @@ endif
|
||||
KOKKOS_LIBS = -ldl
|
||||
KOKKOS_TPL_LIBRARY_NAMES += dl
|
||||
KOKKOS_LDFLAGS = -L$(shell pwd)
|
||||
# CXXLDFLAGS is used together with CXXFLAGS in a combined compile/link command
|
||||
KOKKOS_CXXLDFLAGS = -L$(shell pwd)
|
||||
KOKKOS_LINK_FLAGS =
|
||||
KOKKOS_SRC =
|
||||
KOKKOS_HEADERS =
|
||||
@ -362,7 +376,7 @@ tmp := $(call kokkos_append_header,'\#endif')
|
||||
tmp := $(call kokkos_append_header,"/* Execution Spaces */")
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_HAVE_CUDA")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CUDA")
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_ROCM), 1)
|
||||
@ -374,19 +388,19 @@ ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
||||
tmp := $(call kokkos_append_header,'\#define KOKKOS_HAVE_OPENMP')
|
||||
tmp := $(call kokkos_append_header,'\#define KOKKOS_ENABLE_OPENMP')
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_HAVE_PTHREAD")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_THREADS")
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_HAVE_QTHREADS")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_QTHREADS")
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_HAVE_SERIAL")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_SERIAL")
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_TM), 1)
|
||||
@ -422,13 +436,13 @@ endif
|
||||
tmp := $(call kokkos_append_header,"/* General Settings */")
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX11), 1)
|
||||
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX11_FLAG)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_HAVE_CXX11")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CXX11")
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX1Z), 1)
|
||||
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX1Z_FLAG)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_HAVE_CXX11")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_HAVE_CXX1Z")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CXX11")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CXX1Z")
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1)
|
||||
@ -437,9 +451,9 @@ ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1)
|
||||
endif
|
||||
|
||||
KOKKOS_CXXFLAGS += -g
|
||||
KOKKOS_LDFLAGS += -g -ldl
|
||||
KOKKOS_LDFLAGS += -g
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_HAVE_DEBUG")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_DEBUG")
|
||||
ifeq ($(KOKKOS_INTERNAL_DISABLE_DUALVIEW_MODIFY_CHECK), 0)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK")
|
||||
endif
|
||||
@ -451,14 +465,15 @@ endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_HWLOC), 1)
|
||||
ifneq ($(HWLOC_PATH),)
|
||||
KOKKOS_CPPFLAGS += -I$(HWLOC_PATH)/include
|
||||
KOKKOS_CXXFLAGS += -I$(HWLOC_PATH)/include
|
||||
KOKKOS_LDFLAGS += -L$(HWLOC_PATH)/lib
|
||||
KOKKOS_CXXLDFLAGS += -L$(HWLOC_PATH)/lib
|
||||
KOKKOS_TPL_INCLUDE_DIRS += $(HWLOC_PATH)/include
|
||||
KOKKOS_TPL_LIBRARY_DIRS += $(HWLOC_PATH)/lib
|
||||
endif
|
||||
KOKKOS_LIBS += -lhwloc
|
||||
KOKKOS_TPL_LIBRARY_NAMES += hwloc
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_HAVE_HWLOC")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_HWLOC")
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_LIBRT), 1)
|
||||
@ -469,14 +484,15 @@ endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_MEMKIND), 1)
|
||||
ifneq ($(MEMKIND_PATH),)
|
||||
KOKKOS_CPPFLAGS += -I$(MEMKIND_PATH)/include
|
||||
KOKKOS_CXXFLAGS += -I$(MEMKIND_PATH)/include
|
||||
KOKKOS_LDFLAGS += -L$(MEMKIND_PATH)/lib
|
||||
KOKKOS_CXXLDFLAGS += -L$(MEMKIND_PATH)/lib
|
||||
KOKKOS_TPL_INCLUDE_DIRS += $(MEMKIND_PATH)/include
|
||||
KOKKOS_TPL_LIBRARY_DIRS += $(MEMKIND_PATH)/lib
|
||||
endif
|
||||
KOKKOS_LIBS += -lmemkind -lnuma
|
||||
KOKKOS_TPL_LIBRARY_NAMES += memkind numa
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_HAVE_HBWSPACE")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_HBWSPACE")
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_DISABLE_PROFILING), 0)
|
||||
@ -486,6 +502,13 @@ endif
|
||||
ifeq ($(KOKKOS_INTERNAL_DISABLE_DEPRECATED_CODE), 0)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_DEPRECATED_CODE")
|
||||
endif
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_ETI")
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_LARGE_MEM_TESTS), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_LARGE_MEM_TESTS")
|
||||
endif
|
||||
|
||||
tmp := $(call kokkos_append_header,"/* Optimization Settings */")
|
||||
|
||||
@ -497,27 +520,35 @@ tmp := $(call kokkos_append_header,"/* Cuda Settings */")
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LDG), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_CUDA_USE_LDG_INTRINSIC")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC")
|
||||
else
|
||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_CUDA_USE_LDG_INTRINSIC")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC")
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_UVM), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_CUDA_USE_UVM")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CUDA_UVM")
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_RELOC), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_CUDA_USE_RELOCATABLE_DEVICE_CODE")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE")
|
||||
KOKKOS_CXXFLAGS += --relocatable-device-code=true
|
||||
KOKKOS_LDFLAGS += --relocatable-device-code=true
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
|
||||
ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_NVCC_VERSION) -ge 90; echo $$?),0)
|
||||
# This diagnostic is just plain wrong in CUDA 9
|
||||
# See https://github.com/kokkos/kokkos/issues/1470
|
||||
KOKKOS_CXXFLAGS += -Xcudafe --diag_suppress=esa_on_defaulted_function_ignored
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LAMBDA), 1)
|
||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
|
||||
ifeq ($(shell test $(KOKKOS_INTERNAL_COMPILER_NVCC_VERSION) -gt 70; echo $$?),0)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_CUDA_USE_LAMBDA")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CUDA_LAMBDA")
|
||||
KOKKOS_CXXFLAGS += -expt-extended-lambda
|
||||
else
|
||||
$(warning Warning: Cuda Lambda support was requested but NVCC version is too low. This requires NVCC for Cuda version 7.5 or higher. Disabling Lambda support now.)
|
||||
@ -525,12 +556,12 @@ ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_CUDA_USE_LAMBDA")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_ENABLE_CUDA_LAMBDA")
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_CUDA_CLANG_WORKAROUND")
|
||||
tmp := $(call kokkos_append_header,"\#define KOKKOS_IMPL_CUDA_CLANG_WORKAROUND")
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -907,10 +938,14 @@ ifeq ($(KOKKOS_INTERNAL_USE_ROCM), 1)
|
||||
|
||||
KOKKOS_CXXFLAGS += $(shell $(ROCM_HCC_PATH)/bin/hcc-config --cxxflags)
|
||||
KOKKOS_LDFLAGS += $(shell $(ROCM_HCC_PATH)/bin/hcc-config --ldflags) -lhc_am -lm
|
||||
KOKKOS_CXXLDFLAGS += $(shell $(ROCM_HCC_PATH)/bin/hcc-config --ldflags) -lhc_am -lm
|
||||
KOKKOS_TPL_LIBRARY_NAMES += hc_am m
|
||||
KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_ROCM_ARCH_FLAG)
|
||||
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/ROCm/*.cpp)
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_ETI_PATH)/ROCm/*.cpp)
|
||||
endif
|
||||
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/ROCm/*.hpp)
|
||||
endif
|
||||
|
||||
@ -937,10 +972,14 @@ KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/containers/src/impl/*.cpp)
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.cpp)
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_ETI_PATH)/Cuda/*.cpp)
|
||||
endif
|
||||
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp)
|
||||
ifneq ($(CUDA_PATH),)
|
||||
KOKKOS_CPPFLAGS += -I$(CUDA_PATH)/include
|
||||
KOKKOS_CXXFLAGS += -I$(CUDA_PATH)/include
|
||||
KOKKOS_LDFLAGS += -L$(CUDA_PATH)/lib64
|
||||
KOKKOS_CXXLDFLAGS += -L$(CUDA_PATH)/lib64
|
||||
KOKKOS_TPL_INCLUDE_DIRS += $(CUDA_PATH)/include
|
||||
KOKKOS_TPL_LIBRARY_DIRS += $(CUDA_PATH)/lib64
|
||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_CLANG), 1)
|
||||
@ -964,6 +1003,9 @@ endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.cpp)
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_ETI_PATH)/OpenMP/*.cpp)
|
||||
endif
|
||||
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.hpp)
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_COMPILER_NVCC), 1)
|
||||
@ -978,6 +1020,9 @@ endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.cpp)
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_ETI_PATH)/Threads/*.cpp)
|
||||
endif
|
||||
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.hpp)
|
||||
KOKKOS_LIBS += -lpthread
|
||||
KOKKOS_TPL_LIBRARY_NAMES += pthread
|
||||
@ -987,8 +1032,9 @@ ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1)
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Qthreads/*.cpp)
|
||||
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Qthreads/*.hpp)
|
||||
ifneq ($(QTHREADS_PATH),)
|
||||
KOKKOS_CPPFLAGS += -I$(QTHREADS_PATH)/include
|
||||
KOKKOS_CXXFLAGS += -I$(QTHREADS_PATH)/include
|
||||
KOKKOS_LDFLAGS += -L$(QTHREADS_PATH)/lib
|
||||
KOKKOS_CXXLDFLAGS += -L$(QTHREADS_PATH)/lib
|
||||
KOKKOS_TPL_INCLUDE_DIRS += $(QTHREADS_PATH)/include
|
||||
KOKKOS_TPL_LIBRARY_DIRS += $(QTHREADS_PATH)/lib64
|
||||
endif
|
||||
@ -1011,6 +1057,11 @@ endif
|
||||
|
||||
# Don't include Kokkos_Serial.cpp or Kokkos_Serial_Task.cpp if not using Serial
|
||||
# device to avoid a link warning.
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
KOKKOS_SRC += $(wildcard $(KOKKOS_ETI_PATH)/Serial/*.cpp)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
|
||||
KOKKOS_SRC := $(filter-out $(KOKKOS_PATH)/core/src/impl/Kokkos_Serial.cpp,$(KOKKOS_SRC))
|
||||
KOKKOS_SRC := $(filter-out $(KOKKOS_PATH)/core/src/impl/Kokkos_Serial_Task.cpp,$(KOKKOS_SRC))
|
||||
|
||||
@ -31,6 +31,12 @@ Kokkos_SharedAlloc.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_
|
||||
Kokkos_MemoryPool.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_MemoryPool.cpp
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_MemoryPool.cpp
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
include $(KOKKOS_ETI_PATH)/Serial/Makefile.eti_Serial
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||
Kokkos_Cuda_Impl.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Impl.cpp
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Impl.cpp
|
||||
@ -40,6 +46,9 @@ Kokkos_Cuda_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cu
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Task.cpp
|
||||
Kokkos_Cuda_Locks.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Locks.cpp
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Locks.cpp
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
include $(KOKKOS_ETI_PATH)/Cuda/Makefile.eti_Cuda
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_ROCM), 1)
|
||||
@ -51,6 +60,9 @@ Kokkos_ROCm_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/ROCm/Kokkos_RO
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/ROCm/Kokkos_ROCm_Task.cpp
|
||||
Kokkos_ROCm_Impl.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/ROCm/Kokkos_ROCm_Impl.cpp
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/ROCm/Kokkos_ROCm_Impl.cpp
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
include $(KOKKOS_ETI_PATH)/ROCm/Makefile.eti_ROCm
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
|
||||
@ -58,6 +70,9 @@ Kokkos_ThreadsExec_base.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Threads
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Threads/Kokkos_ThreadsExec_base.cpp
|
||||
Kokkos_ThreadsExec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Threads/Kokkos_ThreadsExec.cpp
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Threads/Kokkos_ThreadsExec.cpp
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
include $(KOKKOS_ETI_PATH)/Threads/Makefile.eti_Threads
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_QTHREADS), 1)
|
||||
@ -72,6 +87,9 @@ Kokkos_OpenMP_Exec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokko
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Exec.cpp
|
||||
Kokkos_OpenMP_Task.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Task.cpp
|
||||
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMP_Task.cpp
|
||||
ifeq ($(KOKKOS_INTERNAL_ENABLE_ETI), 1)
|
||||
include $(KOKKOS_ETI_PATH)/OpenMP/Makefile.eti_OpenMP
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMPTARGET), 1)
|
||||
|
||||
@ -702,7 +702,11 @@ namespace Kokkos {
|
||||
}
|
||||
Random_XorShift64_Pool(uint64_t seed) {
|
||||
num_states_ = 0;
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
init(seed,DeviceType::max_hardware_threads());
|
||||
#else
|
||||
init(seed,DeviceType::impl_max_hardware_threads());
|
||||
#endif
|
||||
}
|
||||
|
||||
Random_XorShift64_Pool(const Random_XorShift64_Pool& src):
|
||||
@ -751,7 +755,11 @@ namespace Kokkos {
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
Random_XorShift64<DeviceType> get_state() const {
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
const int i = DeviceType::hardware_thread_id();;
|
||||
#else
|
||||
const int i = DeviceType::impl_hardware_thread_id();;
|
||||
#endif
|
||||
return Random_XorShift64<DeviceType>(state_(i),i);
|
||||
}
|
||||
|
||||
@ -957,7 +965,11 @@ namespace Kokkos {
|
||||
inline
|
||||
Random_XorShift1024_Pool(uint64_t seed){
|
||||
num_states_ = 0;
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
init(seed,DeviceType::max_hardware_threads());
|
||||
#else
|
||||
init(seed,DeviceType::impl_max_hardware_threads());
|
||||
#endif
|
||||
}
|
||||
|
||||
Random_XorShift1024_Pool(const Random_XorShift1024_Pool& src):
|
||||
@ -1012,7 +1024,11 @@ namespace Kokkos {
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
Random_XorShift1024<DeviceType> get_state() const {
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
const int i = DeviceType::hardware_thread_id();
|
||||
#else
|
||||
const int i = DeviceType::impl_hardware_thread_id();
|
||||
#endif
|
||||
return Random_XorShift1024<DeviceType>(state_,p_(i),i);
|
||||
};
|
||||
|
||||
|
||||
@ -288,6 +288,7 @@ public:
|
||||
Kokkos::abort("BinSort::sort: values range length != permutation vector length");
|
||||
}
|
||||
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
scratch_view_type
|
||||
sorted_values("Scratch",
|
||||
len,
|
||||
@ -298,6 +299,18 @@ public:
|
||||
values.extent(5),
|
||||
values.extent(6),
|
||||
values.extent(7));
|
||||
#else
|
||||
scratch_view_type
|
||||
sorted_values("Scratch",
|
||||
values.rank_dynamic > 0 ? len : KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
values.rank_dynamic > 1 ? values.extent(1) : KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
values.rank_dynamic > 2 ? values.extent(2) : KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
values.rank_dynamic > 3 ? values.extent(3) : KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
values.rank_dynamic > 4 ? values.extent(4) : KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
values.rank_dynamic > 5 ? values.extent(5) : KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
values.rank_dynamic > 6 ? values.extent(6) : KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
values.rank_dynamic > 7 ? values.extent(7) : KOKKOS_IMPL_CTOR_DEFAULT_ARG);
|
||||
#endif
|
||||
|
||||
{
|
||||
copy_permute_functor< scratch_view_type /* DstViewType */
|
||||
@ -362,8 +375,10 @@ public:
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator() (const bin_sort_bins_tag& tag, const int&i ) const {
|
||||
auto bin_size = bin_count_const(i);
|
||||
if (bin_size <= 1) return;
|
||||
int upper_bound = bin_offsets(i)+bin_size;
|
||||
bool sorted = false;
|
||||
int upper_bound = bin_offsets(i)+bin_count_const(i);
|
||||
while(!sorted) {
|
||||
sorted = true;
|
||||
int old_idx = sort_order(bin_offsets(i));
|
||||
@ -501,7 +516,7 @@ bool try_std_sort(ViewType view) {
|
||||
|
||||
template<class ViewType>
|
||||
struct min_max_functor {
|
||||
typedef Kokkos::Experimental::MinMaxScalar<typename ViewType::non_const_value_type> minmax_scalar;
|
||||
typedef Kokkos::MinMaxScalar<typename ViewType::non_const_value_type> minmax_scalar;
|
||||
|
||||
ViewType view;
|
||||
min_max_functor(const ViewType& view_):view(view_) {}
|
||||
@ -523,8 +538,8 @@ void sort( ViewType const & view , bool const always_use_kokkos_sort = false)
|
||||
}
|
||||
typedef BinOp1D<ViewType> CompType;
|
||||
|
||||
Kokkos::Experimental::MinMaxScalar<typename ViewType::non_const_value_type> result;
|
||||
Kokkos::Experimental::MinMax<typename ViewType::non_const_value_type> reducer(result);
|
||||
Kokkos::MinMaxScalar<typename ViewType::non_const_value_type> result;
|
||||
Kokkos::MinMax<typename ViewType::non_const_value_type> reducer(result);
|
||||
parallel_reduce("Kokkos::Sort::FindExtent",Kokkos::RangePolicy<typename ViewType::execution_space>(0,view.extent(0)),
|
||||
Impl::min_max_functor<ViewType>(view),reducer);
|
||||
if(result.min_val == result.max_val) return;
|
||||
@ -542,8 +557,8 @@ void sort( ViewType view
|
||||
typedef Kokkos::RangePolicy<typename ViewType::execution_space> range_policy ;
|
||||
typedef BinOp1D<ViewType> CompType;
|
||||
|
||||
Kokkos::Experimental::MinMaxScalar<typename ViewType::non_const_value_type> result;
|
||||
Kokkos::Experimental::MinMax<typename ViewType::non_const_value_type> reducer(result);
|
||||
Kokkos::MinMaxScalar<typename ViewType::non_const_value_type> result;
|
||||
Kokkos::MinMax<typename ViewType::non_const_value_type> reducer(result);
|
||||
|
||||
parallel_reduce("Kokkos::Sort::FindExtent", range_policy( begin , end )
|
||||
, Impl::min_max_functor<ViewType>(view),reducer );
|
||||
|
||||
@ -76,7 +76,11 @@ IF(KOKKOS_SEPARATE_LIBS)
|
||||
)
|
||||
|
||||
foreach(lib IN LISTS KOKKOS_TPL_LIBRARY_NAMES)
|
||||
find_library(LIB_${lib} ${lib} PATHS ${KOKKOS_TPL_LIBRARY_DIRS})
|
||||
if ("${lib}" STREQUAL "cuda")
|
||||
set(LIB_cuda "-lcuda")
|
||||
else()
|
||||
find_library(LIB_${lib} ${lib} PATHS ${KOKKOS_TPL_LIBRARY_DIRS})
|
||||
endif()
|
||||
target_link_libraries(kokkoscore PUBLIC ${LIB_${lib}})
|
||||
endforeach()
|
||||
|
||||
@ -154,7 +158,11 @@ ELSE()
|
||||
)
|
||||
|
||||
foreach(lib IN LISTS KOKKOS_TPL_LIBRARY_NAMES)
|
||||
find_library(LIB_${lib} ${lib} PATHS ${KOKKOS_TPL_LIBRARY_DIRS})
|
||||
if ("${lib}" STREQUAL "cuda")
|
||||
set(LIB_cuda "-lcuda")
|
||||
else()
|
||||
find_library(LIB_${lib} ${lib} PATHS ${KOKKOS_TPL_LIBRARY_DIRS})
|
||||
endif()
|
||||
target_link_libraries(kokkos PUBLIC ${LIB_${lib}})
|
||||
endforeach()
|
||||
|
||||
|
||||
@ -31,6 +31,7 @@ list(APPEND KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST
|
||||
Profiling_Load_Print
|
||||
Aggressive_Vectorization
|
||||
Deprecated_Code
|
||||
Explicit_Instantiation
|
||||
)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -40,6 +41,7 @@ list(APPEND KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST
|
||||
foreach(opt ${KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST})
|
||||
string(TOUPPER ${opt} OPT )
|
||||
IF(DEFINED Kokkos_ENABLE_${opt})
|
||||
MESSAGE("Kokkos_ENABLE_${opt} is defined!")
|
||||
IF(DEFINED KOKKOS_ENABLE_${OPT})
|
||||
IF(NOT ("${KOKKOS_ENABLE_${OPT}}" STREQUAL "${Kokkos_ENABLE_${opt}}"))
|
||||
IF(DEFINED KOKKOS_ENABLE_${OPT}_INTERNAL)
|
||||
@ -57,18 +59,16 @@ foreach(opt ${KOKKOS_INTERNAL_ENABLE_OPTIONS_LIST})
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(KOKKOS_INTERNAL_ENABLE_${OPT}_DEFAULT ${Kokkos_ENABLE_${opt}})
|
||||
MESSAGE("set KOKKOS_INTERNAL_ENABLE_${OPT}_DEFAULT!")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
endforeach()
|
||||
|
||||
IF(DEFINED Kokkos_ARCH)
|
||||
MESSAGE(FATAL_ERROR "Defined Kokkos_ARCH, use KOKKOS_ARCH instead!")
|
||||
ENDIF()
|
||||
IF(DEFINED Kokkos_Arch)
|
||||
IF(DEFINED KOKKOS_ARCH)
|
||||
IF(NOT (${KOKKOS_ARCH} STREQUAL "${Kokkos_Arch}"))
|
||||
MESSAGE(FATAL_ERROR "Defined both Kokkos_Arch and KOKKOS_ARCH and they differ!")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(KOKKOS_ARCH ${Kokkos_Arch})
|
||||
ENDIF()
|
||||
MESSAGE(FATAL_ERROR "Defined Kokkos_Arch, use KOKKOS_ARCH instead!")
|
||||
ENDIF()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
@ -103,6 +103,8 @@ list(APPEND KOKKOS_ARCH_LIST
|
||||
Maxwell53 # (GPU) NVIDIA Maxwell generation CC 5.3
|
||||
Pascal60 # (GPU) NVIDIA Pascal generation CC 6.0
|
||||
Pascal61 # (GPU) NVIDIA Pascal generation CC 6.1
|
||||
Volta70 # (GPU) NVIDIA Volta generation CC 7.0
|
||||
Volta72 # (GPU) NVIDIA Volta generation CC 7.2
|
||||
)
|
||||
|
||||
# List of possible device architectures.
|
||||
@ -267,6 +269,8 @@ set(KOKKOS_ENABLE_PROFILING_LOAD_PRINT ${KOKKOS_INTERNAL_ENABLE_PROFILING_LOAD_P
|
||||
set_kokkos_default_default(DEPRECATED_CODE ON)
|
||||
set(KOKKOS_ENABLE_DEPRECATED_CODE ${KOKKOS_INTERNAL_ENABLE_DEPRECATED_CODE_DEFAULT} CACHE BOOL "Enable deprecated code.")
|
||||
|
||||
set_kokkos_default_default(EXPLICIT_INSTANTIATION ON)
|
||||
set(KOKKOS_ENABLE_EXPLICIT_INSTANTIATION ${KOKKOS_INTERNAL_ENABLE_EXPLICIT_INSTANTIATION_DEFAULT} CACHE BOOL "Enable explicit template instantiation.")
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#------------------------------- KOKKOS_USE_TPLS -------------------------------
|
||||
|
||||
@ -74,6 +74,9 @@ endif()
|
||||
if(${KOKKOS_ENABLE_PROFILING_LOAD_PRINT})
|
||||
list(APPEND KOKKOS_OPTIONSl enable_profile_load_print)
|
||||
endif()
|
||||
if(${KOKKOS_ENABLE_EXPLICIT_INSTANTIATION})
|
||||
list(APPEND KOKKOS_OPTIONSl enable_eti)
|
||||
endif()
|
||||
# List needs to be comma-delimitted
|
||||
string(REPLACE ";" "," KOKKOS_GMAKE_OPTIONS "${KOKKOS_OPTIONSl}")
|
||||
|
||||
@ -158,6 +161,19 @@ if (NOT "${KOKKOS_INTERNAL_ADDTOPATH}" STREQUAL "")
|
||||
set(KOKKOS_SETTINGS ${KOKKOS_SETTINGS} "PATH=\"${KOKKOS_INTERNAL_ADDTOPATH}:$ENV{PATH}\"")
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_STANDARD)
|
||||
if (CMAKE_CXX_STANDARD STREQUAL "98")
|
||||
message(FATAL_ERROR "Kokkos requires C++11 or newer!")
|
||||
endif()
|
||||
set(KOKKOS_CXX_STANDARD "c++${CMAKE_CXX_STANDARD}")
|
||||
if (CMAKE_CXX_EXTENSIONS)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(KOKKOS_CXX_STANDARD "gnu++${CMAKE_CXX_STANDARD}")
|
||||
endif()
|
||||
endif()
|
||||
set(KOKKOS_SETTINGS ${KOKKOS_SETTINGS} "KOKKOS_CXX_STANDARD=\"${KOKKOS_CXX_STANDARD}\"")
|
||||
endif()
|
||||
|
||||
# Final form that gets passed to make
|
||||
set(KOKKOS_SETTINGS env ${KOKKOS_SETTINGS})
|
||||
|
||||
|
||||
@ -300,7 +300,9 @@ FUNCTION(TRIBITS_ADD_EXECUTABLE EXE_NAME)
|
||||
ENDIF()
|
||||
ENDFUNCTION()
|
||||
|
||||
ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} -VV -C ${CMAKE_CFG_INTDIR})
|
||||
IF(NOT TARGET check)
|
||||
ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND} -VV -C ${CMAKE_CFG_INTDIR})
|
||||
ENDIF()
|
||||
|
||||
FUNCTION(TRIBITS_ADD_TEST)
|
||||
ENDFUNCTION()
|
||||
|
||||
@ -22,30 +22,38 @@ if [[ "$HOSTNAME" =~ .*bowman.* ]]; then
|
||||
module load git
|
||||
fi
|
||||
|
||||
if [[ "$HOSTNAME" =~ n.* ]]; then # Warning: very generic name
|
||||
if [[ "$HOSTNAME" == n* ]]; then # Warning: very generic name
|
||||
if [[ "$PROCESSOR" = "aarch64" ]]; then
|
||||
MACHINE=sullivan
|
||||
module load git
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$HOSTNAME" =~ node.* ]]; then # Warning: very generic name
|
||||
if [[ "$HOSTNAME" == node* ]]; then # Warning: very generic name
|
||||
if [[ "$MACHINE" = "" ]]; then
|
||||
MACHINE=shepard
|
||||
module load git
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$HOSTNAME" =~ apollo ]]; then
|
||||
if [[ "$HOSTNAME" == apollo\.* ]]; then
|
||||
MACHINE=apollo
|
||||
module load git
|
||||
fi
|
||||
|
||||
if [[ "$HOSTNAME" =~ sullivan ]]; then
|
||||
if [[ "$HOSTNAME" == sullivan ]]; then
|
||||
MACHINE=sullivan
|
||||
module load git
|
||||
fi
|
||||
|
||||
if [[ "$HOSTNAME" == mayer\.* ]]; then
|
||||
MACHINE=mayer
|
||||
# module load git
|
||||
fi
|
||||
if [[ "$HOSTNAME" == cn* ]]; then # Warning: very generic name
|
||||
MACHINE=mayer
|
||||
fi
|
||||
|
||||
if [ ! -z "$SEMS_MODULEFILES_ROOT" ]; then
|
||||
if [[ "$MACHINE" = "" ]]; then
|
||||
MACHINE=sems
|
||||
@ -83,7 +91,7 @@ CUSTOM_BUILD_LIST=""
|
||||
QTHREADS_PATH=""
|
||||
DRYRUN=False
|
||||
BUILD_ONLY=False
|
||||
declare -i NUM_JOBS_TO_RUN_IN_PARALLEL=3
|
||||
declare -i NUM_JOBS_TO_RUN_IN_PARALLEL=1
|
||||
TEST_SCRIPT=False
|
||||
SKIP_HWLOC=False
|
||||
SPOT_CHECK=False
|
||||
@ -142,6 +150,9 @@ do
|
||||
--with-cuda-options*)
|
||||
KOKKOS_CUDA_OPTIONS="--with-cuda-options=${key#*=}"
|
||||
;;
|
||||
--with-options*)
|
||||
KOKKOS_OPTIONS="--with-options=enable_large_mem_tests,${key#*=}"
|
||||
;;
|
||||
--cxxflags-extra*)
|
||||
CXX_FLAGS_EXTRA="${key#*=}"
|
||||
;;
|
||||
@ -247,7 +258,7 @@ elif [ "$MACHINE" = "white" ]; then
|
||||
ARCH_FLAG="--arch=Power8,Kepler37"
|
||||
fi
|
||||
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=2
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=1
|
||||
|
||||
elif [ "$MACHINE" = "bowman" ]; then
|
||||
source /etc/profile.d/modules.sh
|
||||
@ -268,7 +279,7 @@ elif [ "$MACHINE" = "bowman" ]; then
|
||||
ARCH_FLAG="--arch=KNL"
|
||||
fi
|
||||
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=2
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=1
|
||||
|
||||
elif [ "$MACHINE" = "sullivan" ]; then
|
||||
source /etc/profile.d/modules.sh
|
||||
@ -284,7 +295,24 @@ elif [ "$MACHINE" = "sullivan" ]; then
|
||||
ARCH_FLAG="--arch=ARMv8-ThunderX"
|
||||
fi
|
||||
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=2
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=1
|
||||
|
||||
elif [ "$MACHINE" = "mayer" ]; then
|
||||
SKIP_HWLOC=True
|
||||
export SLURM_TASKS_PER_NODE=96
|
||||
|
||||
BASE_MODULE_LIST="<COMPILER_NAME>/<COMPILER_VERSION>"
|
||||
ARM_MODULE_LIST="<COMPILER_NAME>/<COMPILER_VERSION>"
|
||||
|
||||
# Format: (compiler module-list build-list exe-name warning-flag)
|
||||
COMPILERS=("gcc/7.2.0 $BASE_MODULE_LIST $ARM_GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
|
||||
"arm/1.4.0 $ARM_MODULE_LIST $ARM_GCC_BUILD_LIST armclang++ $CLANG_WARNING_FLAGS")
|
||||
|
||||
if [ -z "$ARCH_FLAG" ]; then
|
||||
ARCH_FLAG="--arch=ARMv8-TX2"
|
||||
fi
|
||||
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=1
|
||||
|
||||
elif [ "$MACHINE" = "shepard" ]; then
|
||||
source /etc/profile.d/modules.sh
|
||||
@ -303,7 +331,7 @@ elif [ "$MACHINE" = "shepard" ]; then
|
||||
if [ -z "$ARCH_FLAG" ]; then
|
||||
ARCH_FLAG="--arch=HSW"
|
||||
fi
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=2
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=1
|
||||
|
||||
elif [ "$MACHINE" = "apollo" ]; then
|
||||
source /projects/sems/modulefiles/utils/sems-modules-init.sh
|
||||
@ -331,7 +359,7 @@ elif [ "$MACHINE" = "apollo" ]; then
|
||||
if [ "$SPOT_CHECK" = "True" ]; then
|
||||
# Format: (compiler module-list build-list exe-name warning-flag)
|
||||
COMPILERS=("gcc/4.8.4 $BASE_MODULE_LIST "OpenMP,Pthread" g++ $GCC_WARNING_FLAGS"
|
||||
"gcc/5.1.0 $BASE_MODULE_LIST "Serial" g++ $GCC_WARNING_FLAGS"
|
||||
"gcc/5.3.0 $BASE_MODULE_LIST "Serial" g++ $GCC_WARNING_FLAGS"
|
||||
"intel/16.0.1 $BASE_MODULE_LIST "OpenMP" icpc $INTEL_WARNING_FLAGS"
|
||||
"clang/3.9.0 $BASE_MODULE_LIST "Pthread_Serial" clang++ $CLANG_WARNING_FLAGS"
|
||||
"clang/6.0 $CLANG_MODULE_LIST "Cuda_Pthread" clang++ $CUDA_WARNING_FLAGS"
|
||||
@ -358,7 +386,7 @@ elif [ "$MACHINE" = "apollo" ]; then
|
||||
ARCH_FLAG="--arch=SNB,Volta70"
|
||||
fi
|
||||
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=2
|
||||
NUM_JOBS_TO_RUN_IN_PARALLEL=1
|
||||
|
||||
else
|
||||
echo "Unhandled machine $MACHINE" >&2
|
||||
@ -627,6 +655,11 @@ single_build_and_test() {
|
||||
if [[ "$KOKKOS_CUDA_OPTIONS" != "" ]]; then
|
||||
local extra_args="$extra_args $KOKKOS_CUDA_OPTIONS"
|
||||
fi
|
||||
if [[ "$KOKKOS_OPTIONS" != "" ]]; then
|
||||
local extra_args="$extra_args $KOKKOS_OPTIONS"
|
||||
else
|
||||
local extra_args="$extra_args --with-options=enable_large_mem_tests"
|
||||
fi
|
||||
|
||||
echo " Starting job $desc"
|
||||
|
||||
@ -642,7 +675,7 @@ single_build_and_test() {
|
||||
else
|
||||
run_cmd ${KOKKOS_PATH}/generate_makefile.bash --with-devices=$build $ARCH_FLAG --compiler=$(which $compiler_exe) --cxxflags=\"$cxxflags\" --ldflags=\"$ldflags\" $extra_args &>> ${desc}.configure.log || { report_and_log_test_result 1 ${desc} configure && return 0; }
|
||||
local -i build_start_time=$(date +%s)
|
||||
run_cmd make -j 32 build-test >& ${desc}.build.log || { report_and_log_test_result 1 ${desc} build && return 0; }
|
||||
run_cmd make -j 48 build-test >& ${desc}.build.log || { report_and_log_test_result 1 ${desc} build && return 0; }
|
||||
local -i build_end_time=$(date +%s)
|
||||
comment="build_time=$(($build_end_time-$build_start_time))"
|
||||
|
||||
@ -682,6 +715,9 @@ run_in_background() {
|
||||
if [[ "$compiler" == cuda* ]]; then
|
||||
num_jobs=1
|
||||
fi
|
||||
if [[ "$compiler" == clang ]]; then
|
||||
num_jobs=1
|
||||
fi
|
||||
# fi
|
||||
wait_for_jobs $num_jobs
|
||||
|
||||
|
||||
@ -70,13 +70,12 @@ protected:
|
||||
static void SetUpTestCase()
|
||||
{
|
||||
std::cout << std::setprecision(5) << std::scientific;
|
||||
Kokkos::HostSpace::execution_space::initialize();
|
||||
Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(0) );
|
||||
Kokkos::InitArguments args(-1, -1, 0);
|
||||
Kokkos::initialize(args);
|
||||
}
|
||||
static void TearDownTestCase()
|
||||
{
|
||||
Kokkos::Cuda::finalize();
|
||||
Kokkos::HostSpace::execution_space::finalize();
|
||||
Kokkos::finalize();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -70,13 +70,13 @@ protected:
|
||||
{
|
||||
std::cout << std::setprecision(5) << std::scientific;
|
||||
|
||||
Kokkos::OpenMP::initialize();
|
||||
Kokkos::initialize();
|
||||
Kokkos::OpenMP::print_configuration( std::cout );
|
||||
}
|
||||
|
||||
static void TearDownTestCase()
|
||||
{
|
||||
Kokkos::OpenMP::finalize();
|
||||
Kokkos::finalize();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -81,12 +81,12 @@ protected:
|
||||
|
||||
std::cout << "Threads: " << num_threads << std::endl;
|
||||
|
||||
Kokkos::Threads::initialize( num_threads );
|
||||
Kokkos::initialize( Kokkos::InitArguments(num_threads) );
|
||||
}
|
||||
|
||||
static void TearDownTestCase()
|
||||
{
|
||||
Kokkos::Threads::finalize();
|
||||
Kokkos::finalize();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -271,7 +271,7 @@ private:
|
||||
block = Impl::rotate_right(block, offset);
|
||||
return ((( !(scan_direction & BIT_SCAN_REVERSE) ?
|
||||
Impl::bit_scan_forward(block) :
|
||||
Impl::bit_scan_reverse(block)
|
||||
::Kokkos::log2(block)
|
||||
) + offset
|
||||
) & block_mask
|
||||
) + block_start;
|
||||
|
||||
@ -209,14 +209,14 @@ public:
|
||||
/// the first three integer arguments will be nonzero, and you may
|
||||
/// omit the integer arguments that follow.
|
||||
DualView (const std::string& label,
|
||||
const size_t n0 = 0,
|
||||
const size_t n1 = 0,
|
||||
const size_t n2 = 0,
|
||||
const size_t n3 = 0,
|
||||
const size_t n4 = 0,
|
||||
const size_t n5 = 0,
|
||||
const size_t n6 = 0,
|
||||
const size_t n7 = 0)
|
||||
const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG)
|
||||
: d_view (label, n0, n1, n2, n3, n4, n5, n6, n7)
|
||||
, h_view (create_mirror_view (d_view)) // without UVM, host View mirrors
|
||||
, modified_device (View<unsigned int,LayoutLeft,typename t_host::execution_space> ("DualView::modified_device"))
|
||||
@ -464,14 +464,14 @@ public:
|
||||
/// This discards any existing contents of the objects, and resets
|
||||
/// their modified flags. It does <i>not</i> copy the old contents
|
||||
/// of either View into the new View objects.
|
||||
void realloc( const size_t n0 = 0 ,
|
||||
const size_t n1 = 0 ,
|
||||
const size_t n2 = 0 ,
|
||||
const size_t n3 = 0 ,
|
||||
const size_t n4 = 0 ,
|
||||
const size_t n5 = 0 ,
|
||||
const size_t n6 = 0 ,
|
||||
const size_t n7 = 0 ) {
|
||||
void realloc( const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ) {
|
||||
::Kokkos::realloc(d_view,n0,n1,n2,n3,n4,n5,n6,n7);
|
||||
h_view = create_mirror_view( d_view );
|
||||
|
||||
@ -483,14 +483,14 @@ public:
|
||||
///
|
||||
/// This method only copies the old contents into the new View
|
||||
/// objects for the device which was last marked as modified.
|
||||
void resize( const size_t n0 = 0 ,
|
||||
const size_t n1 = 0 ,
|
||||
const size_t n2 = 0 ,
|
||||
const size_t n3 = 0 ,
|
||||
const size_t n4 = 0 ,
|
||||
const size_t n5 = 0 ,
|
||||
const size_t n6 = 0 ,
|
||||
const size_t n7 = 0 ) {
|
||||
void resize( const size_t n0 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n1 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n2 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n3 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n4 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n5 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n6 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ,
|
||||
const size_t n7 = KOKKOS_IMPL_CTOR_DEFAULT_ARG ) {
|
||||
if(modified_device() >= modified_host()) {
|
||||
/* Resize on Device */
|
||||
::Kokkos::resize(d_view,n0,n1,n2,n3,n4,n5,n6,n7);
|
||||
@ -533,10 +533,21 @@ public:
|
||||
//! \name Methods for getting capacity, stride, or dimension(s).
|
||||
//@{
|
||||
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
//! The allocation size (same as Kokkos::View::capacity).
|
||||
size_t capacity() const {
|
||||
return d_view.span();
|
||||
}
|
||||
#endif
|
||||
|
||||
//! The allocation size (same as Kokkos::View::span).
|
||||
KOKKOS_INLINE_FUNCTION constexpr size_t span() const {
|
||||
return d_view.span();
|
||||
}
|
||||
|
||||
KOKKOS_INLINE_FUNCTION bool span_is_contiguous() const {
|
||||
return d_view.span_is_contiguous();
|
||||
}
|
||||
|
||||
//! Get stride(s) for each dimension.
|
||||
template< typename iType>
|
||||
@ -556,6 +567,11 @@ public:
|
||||
extent_int( const iType & r ) const
|
||||
{ return static_cast<int>(d_view.extent(r)); }
|
||||
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
/* Deprecate all 'dimension' functions in favor of
|
||||
* ISO/C++ vocabulary 'extent'.
|
||||
*/
|
||||
|
||||
/* \brief return size of dimension 0 */
|
||||
size_t dimension_0() const {return d_view.extent(0);}
|
||||
/* \brief return size of dimension 1 */
|
||||
@ -572,6 +588,7 @@ public:
|
||||
size_t dimension_6() const {return d_view.extent(6);}
|
||||
/* \brief return size of dimension 7 */
|
||||
size_t dimension_7() const {return d_view.extent(7);}
|
||||
#endif
|
||||
|
||||
//@}
|
||||
};
|
||||
|
||||
@ -64,7 +64,7 @@ namespace Impl {
|
||||
template <typename Specialize>
|
||||
struct DynRankDimTraits {
|
||||
|
||||
enum : size_t{unspecified = ~size_t(0)};
|
||||
enum : size_t{unspecified =KOKKOS_INVALID_INDEX};
|
||||
|
||||
// Compute the rank of the view from the nonzero dimension arguments.
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
@ -192,14 +192,14 @@ struct DynRankDimTraits {
|
||||
static typename std::enable_if< (std::is_same<Layout , Kokkos::LayoutRight>::value || std::is_same<Layout , Kokkos::LayoutLeft>::value) && std::is_integral<iType>::value , Layout >::type
|
||||
reconstructLayout( const Layout& layout , iType dynrank )
|
||||
{
|
||||
return Layout( dynrank > 0 ? layout.dimension[0] : ~size_t(0)
|
||||
, dynrank > 1 ? layout.dimension[1] : ~size_t(0)
|
||||
, dynrank > 2 ? layout.dimension[2] : ~size_t(0)
|
||||
, dynrank > 3 ? layout.dimension[3] : ~size_t(0)
|
||||
, dynrank > 4 ? layout.dimension[4] : ~size_t(0)
|
||||
, dynrank > 5 ? layout.dimension[5] : ~size_t(0)
|
||||
, dynrank > 6 ? layout.dimension[6] : ~size_t(0)
|
||||
, dynrank > 7 ? layout.dimension[7] : ~size_t(0)
|
||||
return Layout( dynrank > 0 ? layout.dimension[0] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 1 ? layout.dimension[1] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 2 ? layout.dimension[2] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 3 ? layout.dimension[3] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 4 ? layout.dimension[4] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 5 ? layout.dimension[5] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 6 ? layout.dimension[6] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 7 ? layout.dimension[7] :KOKKOS_INVALID_INDEX
|
||||
);
|
||||
}
|
||||
|
||||
@ -209,21 +209,21 @@ struct DynRankDimTraits {
|
||||
static typename std::enable_if< (std::is_same<Layout , Kokkos::LayoutStride>::value) && std::is_integral<iType>::value , Layout >::type
|
||||
reconstructLayout( const Layout& layout , iType dynrank )
|
||||
{
|
||||
return Layout( dynrank > 0 ? layout.dimension[0] : ~size_t(0)
|
||||
return Layout( dynrank > 0 ? layout.dimension[0] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 0 ? layout.stride[0] : (0)
|
||||
, dynrank > 1 ? layout.dimension[1] : ~size_t(0)
|
||||
, dynrank > 1 ? layout.dimension[1] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 1 ? layout.stride[1] : (0)
|
||||
, dynrank > 2 ? layout.dimension[2] : ~size_t(0)
|
||||
, dynrank > 2 ? layout.dimension[2] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 2 ? layout.stride[2] : (0)
|
||||
, dynrank > 3 ? layout.dimension[3] : ~size_t(0)
|
||||
, dynrank > 3 ? layout.dimension[3] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 3 ? layout.stride[3] : (0)
|
||||
, dynrank > 4 ? layout.dimension[4] : ~size_t(0)
|
||||
, dynrank > 4 ? layout.dimension[4] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 4 ? layout.stride[4] : (0)
|
||||
, dynrank > 5 ? layout.dimension[5] : ~size_t(0)
|
||||
, dynrank > 5 ? layout.dimension[5] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 5 ? layout.stride[5] : (0)
|
||||
, dynrank > 6 ? layout.dimension[6] : ~size_t(0)
|
||||
, dynrank > 6 ? layout.dimension[6] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 6 ? layout.stride[6] : (0)
|
||||
, dynrank > 7 ? layout.dimension[7] : ~size_t(0)
|
||||
, dynrank > 7 ? layout.dimension[7] :KOKKOS_INVALID_INDEX
|
||||
, dynrank > 7 ? layout.stride[7] : (0)
|
||||
);
|
||||
}
|
||||
@ -501,6 +501,7 @@ public:
|
||||
* ISO/C++ vocabulary 'extent'.
|
||||
*/
|
||||
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
template< typename iType >
|
||||
KOKKOS_INLINE_FUNCTION constexpr
|
||||
typename std::enable_if< std::is_integral<iType>::value , size_t >::type
|
||||
@ -514,17 +515,18 @@ public:
|
||||
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_5() const { return m_map.dimension_5(); }
|
||||
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_6() const { return m_map.dimension_6(); }
|
||||
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_7() const { return m_map.dimension_7(); }
|
||||
#endif
|
||||
|
||||
//----------------------------------------
|
||||
|
||||
KOKKOS_INLINE_FUNCTION constexpr size_t size() const { return m_map.dimension_0() *
|
||||
m_map.dimension_1() *
|
||||
m_map.dimension_2() *
|
||||
m_map.dimension_3() *
|
||||
m_map.dimension_4() *
|
||||
m_map.dimension_5() *
|
||||
m_map.dimension_6() *
|
||||
m_map.dimension_7(); }
|
||||
KOKKOS_INLINE_FUNCTION constexpr size_t size() const { return m_map.extent(0) *
|
||||
m_map.extent(1) *
|
||||
m_map.extent(2) *
|
||||
m_map.extent(3) *
|
||||
m_map.extent(4) *
|
||||
m_map.extent(5) *
|
||||
m_map.extent(6) *
|
||||
m_map.extent(7); }
|
||||
|
||||
KOKKOS_INLINE_FUNCTION constexpr size_t stride_0() const { return m_map.stride_0(); }
|
||||
KOKKOS_INLINE_FUNCTION constexpr size_t stride_1() const { return m_map.stride_1(); }
|
||||
@ -547,15 +549,19 @@ public:
|
||||
enum { reference_type_is_lvalue_reference = std::is_lvalue_reference< reference_type >::value };
|
||||
|
||||
KOKKOS_INLINE_FUNCTION constexpr size_t span() const { return m_map.span(); }
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
// Deprecated, use 'span()' instead
|
||||
KOKKOS_INLINE_FUNCTION constexpr size_t capacity() const { return m_map.span(); }
|
||||
#endif
|
||||
KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const { return m_map.span_is_contiguous(); }
|
||||
KOKKOS_INLINE_FUNCTION constexpr pointer_type data() const { return m_map.data(); }
|
||||
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
// Deprecated, use 'span_is_contigous()' instead
|
||||
KOKKOS_INLINE_FUNCTION constexpr bool is_contiguous() const { return m_map.span_is_contiguous(); }
|
||||
// Deprecated, use 'data()' instead
|
||||
KOKKOS_INLINE_FUNCTION constexpr pointer_type ptr_on_device() const { return m_map.data(); }
|
||||
#endif
|
||||
|
||||
//----------------------------------------
|
||||
// Allow specializations to query their specialized map
|
||||
@ -998,7 +1004,7 @@ public:
|
||||
|
||||
//----------------------------------------
|
||||
// Allocation according to allocation properties and array layout
|
||||
// unused arg_layout dimensions must be set to ~size_t(0) so that rank deduction can properly take place
|
||||
// unused arg_layout dimensions must be set toKOKKOS_INVALID_INDEX so that rank deduction can properly take place
|
||||
template< class ... P >
|
||||
explicit inline
|
||||
DynRankView( const Kokkos::Impl::ViewCtorProp< P ... > & arg_prop
|
||||
@ -1038,7 +1044,12 @@ public:
|
||||
, "View allocation constructor requires managed memory" );
|
||||
|
||||
if ( alloc_prop::initialize &&
|
||||
! alloc_prop::execution_space::is_initialized() ) {
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
! alloc_prop::execution_space::is_initialized()
|
||||
#else
|
||||
! alloc_prop::execution_space::impl_is_initialized()
|
||||
#endif
|
||||
) {
|
||||
// If initializing view data then
|
||||
// the execution space must be initialized.
|
||||
Kokkos::Impl::throw_runtime_exception("Constructing DynRankView and initializing data with uninitialized execution space");
|
||||
@ -1104,14 +1115,14 @@ public:
|
||||
DynRankView( const Kokkos::Impl::ViewCtorProp< P ... > & arg_prop
|
||||
, typename std::enable_if< ! Kokkos::Impl::ViewCtorProp< P... >::has_pointer
|
||||
, size_t
|
||||
>::type const arg_N0 = ~size_t(0)
|
||||
, const size_t arg_N1 = ~size_t(0)
|
||||
, const size_t arg_N2 = ~size_t(0)
|
||||
, const size_t arg_N3 = ~size_t(0)
|
||||
, const size_t arg_N4 = ~size_t(0)
|
||||
, const size_t arg_N5 = ~size_t(0)
|
||||
, const size_t arg_N6 = ~size_t(0)
|
||||
, const size_t arg_N7 = ~size_t(0)
|
||||
>::type const arg_N0 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N1 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N2 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N3 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N4 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N5 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N6 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N7 =KOKKOS_INVALID_INDEX
|
||||
)
|
||||
: DynRankView( arg_prop
|
||||
, typename traits::array_layout
|
||||
@ -1124,14 +1135,14 @@ public:
|
||||
DynRankView( const Kokkos::Impl::ViewCtorProp< P ... > & arg_prop
|
||||
, typename std::enable_if< Kokkos::Impl::ViewCtorProp< P... >::has_pointer
|
||||
, size_t
|
||||
>::type const arg_N0 = ~size_t(0)
|
||||
, const size_t arg_N1 = ~size_t(0)
|
||||
, const size_t arg_N2 = ~size_t(0)
|
||||
, const size_t arg_N3 = ~size_t(0)
|
||||
, const size_t arg_N4 = ~size_t(0)
|
||||
, const size_t arg_N5 = ~size_t(0)
|
||||
, const size_t arg_N6 = ~size_t(0)
|
||||
, const size_t arg_N7 = ~size_t(0)
|
||||
>::type const arg_N0 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N1 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N2 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N3 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N4 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N5 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N6 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N7 =KOKKOS_INVALID_INDEX
|
||||
)
|
||||
: DynRankView( arg_prop
|
||||
, typename traits::array_layout
|
||||
@ -1156,14 +1167,14 @@ public:
|
||||
DynRankView( const Label & arg_label
|
||||
, typename std::enable_if<
|
||||
Kokkos::Impl::is_view_label<Label>::value ,
|
||||
const size_t >::type arg_N0 = ~size_t(0)
|
||||
, const size_t arg_N1 = ~size_t(0)
|
||||
, const size_t arg_N2 = ~size_t(0)
|
||||
, const size_t arg_N3 = ~size_t(0)
|
||||
, const size_t arg_N4 = ~size_t(0)
|
||||
, const size_t arg_N5 = ~size_t(0)
|
||||
, const size_t arg_N6 = ~size_t(0)
|
||||
, const size_t arg_N7 = ~size_t(0)
|
||||
const size_t >::type arg_N0 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N1 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N2 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N3 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N4 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N5 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N6 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N7 =KOKKOS_INVALID_INDEX
|
||||
)
|
||||
: DynRankView( Kokkos::Impl::ViewCtorProp< std::string >( arg_label )
|
||||
, typename traits::array_layout
|
||||
@ -1185,14 +1196,14 @@ public:
|
||||
|
||||
explicit inline
|
||||
DynRankView( const ViewAllocateWithoutInitializing & arg_prop
|
||||
, const size_t arg_N0 = ~size_t(0)
|
||||
, const size_t arg_N1 = ~size_t(0)
|
||||
, const size_t arg_N2 = ~size_t(0)
|
||||
, const size_t arg_N3 = ~size_t(0)
|
||||
, const size_t arg_N4 = ~size_t(0)
|
||||
, const size_t arg_N5 = ~size_t(0)
|
||||
, const size_t arg_N6 = ~size_t(0)
|
||||
, const size_t arg_N7 = ~size_t(0)
|
||||
, const size_t arg_N0 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N1 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N2 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N3 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N4 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N5 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N6 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N7 =KOKKOS_INVALID_INDEX
|
||||
)
|
||||
: DynRankView(Kokkos::Impl::ViewCtorProp< std::string , Kokkos::Impl::WithoutInitializing_t >( arg_prop.label , Kokkos::WithoutInitializing ), arg_N0, arg_N1, arg_N2, arg_N3, arg_N4, arg_N5, arg_N6, arg_N7 )
|
||||
{}
|
||||
@ -1218,14 +1229,14 @@ public:
|
||||
|
||||
explicit KOKKOS_INLINE_FUNCTION
|
||||
DynRankView( pointer_type arg_ptr
|
||||
, const size_t arg_N0 = ~size_t(0)
|
||||
, const size_t arg_N1 = ~size_t(0)
|
||||
, const size_t arg_N2 = ~size_t(0)
|
||||
, const size_t arg_N3 = ~size_t(0)
|
||||
, const size_t arg_N4 = ~size_t(0)
|
||||
, const size_t arg_N5 = ~size_t(0)
|
||||
, const size_t arg_N6 = ~size_t(0)
|
||||
, const size_t arg_N7 = ~size_t(0)
|
||||
, const size_t arg_N0 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N1 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N2 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N3 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N4 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N5 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N6 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N7 =KOKKOS_INVALID_INDEX
|
||||
)
|
||||
: DynRankView( Kokkos::Impl::ViewCtorProp<pointer_type>(arg_ptr) , arg_N0, arg_N1, arg_N2, arg_N3, arg_N4, arg_N5, arg_N6, arg_N7 )
|
||||
{}
|
||||
@ -1242,19 +1253,19 @@ public:
|
||||
// Shared scratch memory constructor
|
||||
|
||||
static inline
|
||||
size_t shmem_size( const size_t arg_N0 = ~size_t(0) ,
|
||||
const size_t arg_N1 = ~size_t(0) ,
|
||||
const size_t arg_N2 = ~size_t(0) ,
|
||||
const size_t arg_N3 = ~size_t(0) ,
|
||||
const size_t arg_N4 = ~size_t(0) ,
|
||||
const size_t arg_N5 = ~size_t(0) ,
|
||||
const size_t arg_N6 = ~size_t(0) ,
|
||||
const size_t arg_N7 = ~size_t(0) )
|
||||
size_t shmem_size( const size_t arg_N0 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t arg_N1 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t arg_N2 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t arg_N3 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t arg_N4 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t arg_N5 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t arg_N6 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t arg_N7 =KOKKOS_INVALID_INDEX )
|
||||
{
|
||||
const size_t num_passed_args =
|
||||
( arg_N0 != ~size_t(0) ) + ( arg_N1 != ~size_t(0) ) + ( arg_N2 != ~size_t(0) ) +
|
||||
( arg_N3 != ~size_t(0) ) + ( arg_N4 != ~size_t(0) ) + ( arg_N5 != ~size_t(0) ) +
|
||||
( arg_N6 != ~size_t(0) ) + ( arg_N7 != ~size_t(0) );
|
||||
( arg_N0 !=KOKKOS_INVALID_INDEX ) + ( arg_N1 !=KOKKOS_INVALID_INDEX ) + ( arg_N2 !=KOKKOS_INVALID_INDEX ) +
|
||||
( arg_N3 !=KOKKOS_INVALID_INDEX ) + ( arg_N4 !=KOKKOS_INVALID_INDEX ) + ( arg_N5 !=KOKKOS_INVALID_INDEX ) +
|
||||
( arg_N6 !=KOKKOS_INVALID_INDEX ) + ( arg_N7 !=KOKKOS_INVALID_INDEX );
|
||||
|
||||
if ( std::is_same<typename traits::specialize , void>::value && num_passed_args != traits::rank_dynamic ) {
|
||||
Kokkos::abort( "Kokkos::View::shmem_size() rank_dynamic != number of arguments.\n" );
|
||||
@ -1280,14 +1291,14 @@ public:
|
||||
|
||||
explicit KOKKOS_INLINE_FUNCTION
|
||||
DynRankView( const typename traits::execution_space::scratch_memory_space & arg_space
|
||||
, const size_t arg_N0 = ~size_t(0)
|
||||
, const size_t arg_N1 = ~size_t(0)
|
||||
, const size_t arg_N2 = ~size_t(0)
|
||||
, const size_t arg_N3 = ~size_t(0)
|
||||
, const size_t arg_N4 = ~size_t(0)
|
||||
, const size_t arg_N5 = ~size_t(0)
|
||||
, const size_t arg_N6 = ~size_t(0)
|
||||
, const size_t arg_N7 = ~size_t(0) )
|
||||
, const size_t arg_N0 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N1 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N2 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N3 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N4 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N5 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N6 =KOKKOS_INVALID_INDEX
|
||||
, const size_t arg_N7 =KOKKOS_INVALID_INDEX )
|
||||
|
||||
: DynRankView( Kokkos::Impl::ViewCtorProp<pointer_type>(
|
||||
reinterpret_cast<pointer_type>(
|
||||
@ -1530,14 +1541,14 @@ bool operator == ( const DynRankView<LT,LP...> & lhs ,
|
||||
lhs.rank() == rhs.rank() &&
|
||||
lhs.data() == rhs.data() &&
|
||||
lhs.span() == rhs.span() &&
|
||||
lhs.dimension(0) == rhs.dimension(0) &&
|
||||
lhs.dimension(1) == rhs.dimension(1) &&
|
||||
lhs.dimension(2) == rhs.dimension(2) &&
|
||||
lhs.dimension(3) == rhs.dimension(3) &&
|
||||
lhs.dimension(4) == rhs.dimension(4) &&
|
||||
lhs.dimension(5) == rhs.dimension(5) &&
|
||||
lhs.dimension(6) == rhs.dimension(6) &&
|
||||
lhs.dimension(7) == rhs.dimension(7);
|
||||
lhs.extent(0) == rhs.extent(0) &&
|
||||
lhs.extent(1) == rhs.extent(1) &&
|
||||
lhs.extent(2) == rhs.extent(2) &&
|
||||
lhs.extent(3) == rhs.extent(3) &&
|
||||
lhs.extent(4) == rhs.extent(4) &&
|
||||
lhs.extent(5) == rhs.extent(5) &&
|
||||
lhs.extent(6) == rhs.extent(6) &&
|
||||
lhs.extent(7) == rhs.extent(7);
|
||||
}
|
||||
|
||||
template< class LT , class ... LP , class RT , class ... RP >
|
||||
@ -1566,12 +1577,12 @@ struct DynRankViewFill {
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator()( const size_t i0 ) const
|
||||
{
|
||||
const size_t n1 = output.dimension_1();
|
||||
const size_t n2 = output.dimension_2();
|
||||
const size_t n3 = output.dimension_3();
|
||||
const size_t n4 = output.dimension_4();
|
||||
const size_t n5 = output.dimension_5();
|
||||
const size_t n6 = output.dimension_6();
|
||||
const size_t n1 = output.extent(1);
|
||||
const size_t n2 = output.extent(2);
|
||||
const size_t n3 = output.extent(3);
|
||||
const size_t n4 = output.extent(4);
|
||||
const size_t n5 = output.extent(5);
|
||||
const size_t n6 = output.extent(6);
|
||||
|
||||
for ( size_t i1 = 0 ; i1 < n1 ; ++i1 ) {
|
||||
for ( size_t i2 = 0 ; i2 < n2 ; ++i2 ) {
|
||||
@ -1589,7 +1600,7 @@ struct DynRankViewFill {
|
||||
typedef typename OutputView::execution_space execution_space ;
|
||||
typedef Kokkos::RangePolicy< execution_space > Policy ;
|
||||
|
||||
const Kokkos::Impl::ParallelFor< DynRankViewFill , Policy > closure( *this , Policy( 0 , output.dimension_0() ) );
|
||||
const Kokkos::Impl::ParallelFor< DynRankViewFill , Policy > closure( *this , Policy( 0 , output.extent(0) ) );
|
||||
|
||||
closure.execute();
|
||||
|
||||
@ -1985,14 +1996,14 @@ namespace Kokkos {
|
||||
template< class T , class ... P >
|
||||
inline
|
||||
void resize( DynRankView<T,P...> & v ,
|
||||
const size_t n0 = ~size_t(0) ,
|
||||
const size_t n1 = ~size_t(0) ,
|
||||
const size_t n2 = ~size_t(0) ,
|
||||
const size_t n3 = ~size_t(0) ,
|
||||
const size_t n4 = ~size_t(0) ,
|
||||
const size_t n5 = ~size_t(0) ,
|
||||
const size_t n6 = ~size_t(0) ,
|
||||
const size_t n7 = ~size_t(0) )
|
||||
const size_t n0 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n1 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n2 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n3 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n4 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n5 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n6 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n7 =KOKKOS_INVALID_INDEX )
|
||||
{
|
||||
typedef DynRankView<T,P...> drview_type ;
|
||||
|
||||
@ -2009,14 +2020,14 @@ void resize( DynRankView<T,P...> & v ,
|
||||
template< class T , class ... P >
|
||||
inline
|
||||
void realloc( DynRankView<T,P...> & v ,
|
||||
const size_t n0 = ~size_t(0) ,
|
||||
const size_t n1 = ~size_t(0) ,
|
||||
const size_t n2 = ~size_t(0) ,
|
||||
const size_t n3 = ~size_t(0) ,
|
||||
const size_t n4 = ~size_t(0) ,
|
||||
const size_t n5 = ~size_t(0) ,
|
||||
const size_t n6 = ~size_t(0) ,
|
||||
const size_t n7 = ~size_t(0) )
|
||||
const size_t n0 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n1 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n2 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n3 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n4 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n5 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n6 =KOKKOS_INVALID_INDEX ,
|
||||
const size_t n7 =KOKKOS_INVALID_INDEX )
|
||||
{
|
||||
typedef DynRankView<T,P...> drview_type ;
|
||||
|
||||
|
||||
@ -97,11 +97,10 @@ private:
|
||||
static_assert( traits::rank == 1 && traits::rank_dynamic == 1
|
||||
, "DynamicView must be rank-one" );
|
||||
|
||||
static_assert( std::is_trivial< typename traits::value_type >::value &&
|
||||
std::is_same< typename traits::specialize , void >::value &&
|
||||
Kokkos::Impl::is_power_of_two
|
||||
<sizeof(typename traits::value_type)>::value
|
||||
, "DynamicView must have trivial value_type and sizeof(value_type) is a power-of-two");
|
||||
// It is assumed that the value_type is trivially copyable;
|
||||
// when this is not the case, potential problems can occur.
|
||||
static_assert( std::is_same< typename traits::specialize , void >::value
|
||||
, "DynamicView only implemented for non-specialized View type");
|
||||
|
||||
|
||||
template< class Space , bool = Kokkos::Impl::MemorySpaceAccess< Space , typename traits::memory_space >::accessible > struct verify_space
|
||||
@ -143,6 +142,17 @@ public:
|
||||
/** \brief Must be accessible everywhere */
|
||||
typedef DynamicView HostMirror ;
|
||||
|
||||
/** \brief Unified types */
|
||||
typedef Kokkos::Device<typename traits::device_type::execution_space, Kokkos::AnonymousSpace> uniform_device;
|
||||
typedef array_type uniform_type;
|
||||
typedef const_type uniform_const_type;
|
||||
typedef array_type uniform_runtime_type;
|
||||
typedef const_type uniform_runtime_const_type;
|
||||
typedef DynamicView<typename traits::data_type, uniform_device> uniform_nomemspace_type;
|
||||
typedef DynamicView<typename traits::const_data_type, uniform_device> uniform_const_nomemspace_type;
|
||||
typedef DynamicView<typename traits::data_type, uniform_device> uniform_runtime_nomemspace_type;
|
||||
typedef DynamicView<typename traits::const_data_type, uniform_device> uniform_runtime_const_nomemspace_type;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
enum { Rank = 1 };
|
||||
@ -279,7 +289,7 @@ public:
|
||||
resize_serial( IntType const & n )
|
||||
{
|
||||
typedef typename traits::value_type value_type ;
|
||||
typedef value_type * pointer_type ;
|
||||
typedef value_type * value_pointer_type ;
|
||||
|
||||
const uintptr_t NC = ( n + m_chunk_mask ) >> m_chunk_shift ; // New total number of chunks needed for resize
|
||||
|
||||
@ -293,7 +303,7 @@ public:
|
||||
|
||||
if ( *pc < NC ) {
|
||||
while ( *pc < NC ) {
|
||||
m_chunks[*pc] = reinterpret_cast<pointer_type>
|
||||
m_chunks[*pc] = reinterpret_cast<value_pointer_type>
|
||||
(
|
||||
typename traits::memory_space().allocate( sizeof(value_type) << m_chunk_shift )
|
||||
);
|
||||
@ -533,14 +543,14 @@ struct CommonSubview<DstType,Kokkos::Experimental::DynamicView<SP...>,1,Arg0> {
|
||||
};
|
||||
|
||||
template<class ...DP,class ViewTypeB, class Layout, class ExecSpace,typename iType>
|
||||
struct ViewCopy<Kokkos::Experimental::DynamicView<DP...>,ViewTypeB,Layout,ExecSpace,1,iType> {
|
||||
struct ViewCopy<Kokkos::Experimental::DynamicView<DP...>,ViewTypeB,Layout,ExecSpace,1,iType,false> {
|
||||
Kokkos::Experimental::DynamicView<DP...> a;
|
||||
ViewTypeB b;
|
||||
|
||||
typedef Kokkos::RangePolicy<ExecSpace,Kokkos::IndexType<iType>> policy_type;
|
||||
|
||||
ViewCopy(const Kokkos::Experimental::DynamicView<DP...>& a_, const ViewTypeB& b_):a(a_),b(b_) {
|
||||
Kokkos::parallel_for("Kokkos::ViewCopy-2D",
|
||||
Kokkos::parallel_for("Kokkos::ViewCopy-1D",
|
||||
policy_type(0,b.extent(0)),*this);
|
||||
}
|
||||
|
||||
@ -552,7 +562,7 @@ struct ViewCopy<Kokkos::Experimental::DynamicView<DP...>,ViewTypeB,Layout,ExecSp
|
||||
|
||||
template<class ...DP,class ...SP, class Layout, class ExecSpace,typename iType>
|
||||
struct ViewCopy<Kokkos::Experimental::DynamicView<DP...>,
|
||||
Kokkos::Experimental::DynamicView<SP...>,Layout,ExecSpace,1,iType> {
|
||||
Kokkos::Experimental::DynamicView<SP...>,Layout,ExecSpace,1,iType,false> {
|
||||
Kokkos::Experimental::DynamicView<DP...> a;
|
||||
Kokkos::Experimental::DynamicView<SP...> b;
|
||||
|
||||
@ -561,7 +571,7 @@ struct ViewCopy<Kokkos::Experimental::DynamicView<DP...>,
|
||||
ViewCopy(const Kokkos::Experimental::DynamicView<DP...>& a_,
|
||||
const Kokkos::Experimental::DynamicView<SP...>& b_):a(a_),b(b_) {
|
||||
const iType n = std::min(a.extent(0),b.extent(0));
|
||||
Kokkos::parallel_for("Kokkos::ViewCopy-2D",
|
||||
Kokkos::parallel_for("Kokkos::ViewCopy-1D",
|
||||
policy_type(0,n),*this);
|
||||
}
|
||||
|
||||
|
||||
@ -578,13 +578,24 @@ public:
|
||||
, internal_view(Kokkos::ViewAllocateWithoutInitializing(
|
||||
std::string("duplicated_") + original_view.label()),
|
||||
unique_token.size(),
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
original_view.extent(0),
|
||||
original_view.extent(1),
|
||||
original_view.extent(2),
|
||||
original_view.extent(3),
|
||||
original_view.extent(4),
|
||||
original_view.extent(5),
|
||||
original_view.extent(6))
|
||||
original_view.extent(6) )
|
||||
#else
|
||||
original_view.rank_dynamic > 0 ? original_view.extent(0): KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
original_view.rank_dynamic > 1 ? original_view.extent(1): KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
original_view.rank_dynamic > 2 ? original_view.extent(2): KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
original_view.rank_dynamic > 3 ? original_view.extent(3): KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
original_view.rank_dynamic > 4 ? original_view.extent(4): KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
original_view.rank_dynamic > 5 ? original_view.extent(5): KOKKOS_IMPL_CTOR_DEFAULT_ARG,
|
||||
original_view.rank_dynamic > 6 ? original_view.extent(6): KOKKOS_IMPL_CTOR_DEFAULT_ARG)
|
||||
|
||||
#endif
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
@ -258,6 +258,9 @@ public:
|
||||
/// \tparam Arg2Type The third template parameter, which if provided
|
||||
/// corresponds to the Device type.
|
||||
///
|
||||
/// \tparam Arg3Type The third template parameter, which if provided
|
||||
/// corresponds to the MemoryTraits.
|
||||
///
|
||||
/// \tparam SizeType The type of row offsets. Usually the default
|
||||
/// parameter suffices. However, setting a nondefault value is
|
||||
/// necessary in some cases, for example, if you want to have a
|
||||
@ -275,37 +278,53 @@ public:
|
||||
template< class DataType,
|
||||
class Arg1Type,
|
||||
class Arg2Type = void,
|
||||
typename SizeType = typename ViewTraits<DataType*, Arg1Type, Arg2Type, void >::size_type>
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
typename SizeType = typename ViewTraits<DataType*, Arg1Type, Arg2Type >::size_type,
|
||||
class Arg3Type = void>
|
||||
#else
|
||||
class Arg3Type = void,
|
||||
typename SizeType = typename ViewTraits<DataType*, Arg1Type, Arg2Type, Arg3Type >::size_type>
|
||||
#endif
|
||||
class StaticCrsGraph {
|
||||
private:
|
||||
typedef ViewTraits<DataType*, Arg1Type, Arg2Type, void> traits;
|
||||
typedef ViewTraits<DataType*, Arg1Type, Arg2Type, Arg3Type> traits;
|
||||
|
||||
public:
|
||||
typedef DataType data_type;
|
||||
typedef typename traits::array_layout array_layout;
|
||||
typedef typename traits::execution_space execution_space;
|
||||
typedef typename traits::device_type device_type;
|
||||
typedef typename traits::memory_traits memory_traits;
|
||||
typedef SizeType size_type;
|
||||
|
||||
typedef StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType > staticcrsgraph_type;
|
||||
typedef StaticCrsGraph< DataType , array_layout , typename traits::host_mirror_space , SizeType > HostMirror;
|
||||
typedef View< const size_type* , array_layout, device_type > row_map_type;
|
||||
typedef View< DataType* , array_layout, device_type > entries_type;
|
||||
typedef View< const size_type* , array_layout, device_type > row_block_type;
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
typedef StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type > staticcrsgraph_type;
|
||||
typedef StaticCrsGraph< data_type , array_layout , typename traits::host_mirror_space , size_type, memory_traits > HostMirror;
|
||||
#else
|
||||
typedef StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type, SizeType > staticcrsgraph_type;
|
||||
typedef StaticCrsGraph< data_type , array_layout , typename traits::host_mirror_space , memory_traits, size_type > HostMirror;
|
||||
#endif
|
||||
|
||||
typedef View< const size_type* , array_layout, device_type , memory_traits > row_map_type;
|
||||
typedef View< data_type* , array_layout, device_type , memory_traits > entries_type;
|
||||
typedef View< const size_type* , array_layout, device_type , memory_traits > row_block_type;
|
||||
|
||||
entries_type entries;
|
||||
row_map_type row_map;
|
||||
row_block_type row_block_offsets;
|
||||
|
||||
//! Construct an empty view.
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
StaticCrsGraph () : entries(), row_map(), row_block_offsets() {}
|
||||
|
||||
//! Copy constructor (shallow copy).
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
StaticCrsGraph (const StaticCrsGraph& rhs) : entries (rhs.entries), row_map (rhs.row_map),
|
||||
row_block_offsets(rhs.row_block_offsets)
|
||||
{}
|
||||
|
||||
template<class EntriesType, class RowMapType>
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
StaticCrsGraph (const EntriesType& entries_,const RowMapType& row_map_) : entries (entries_), row_map (row_map_),
|
||||
row_block_offsets()
|
||||
{}
|
||||
@ -314,6 +333,7 @@ public:
|
||||
* If the old view is the last view
|
||||
* then allocated memory is deallocated.
|
||||
*/
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
StaticCrsGraph& operator= (const StaticCrsGraph& rhs) {
|
||||
entries = rhs.entries;
|
||||
row_map = rhs.row_map;
|
||||
@ -324,6 +344,7 @@ public:
|
||||
/** \brief Destroy this view of the array.
|
||||
* If the last view then allocated memory is deallocated.
|
||||
*/
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
~StaticCrsGraph() {}
|
||||
|
||||
/** \brief Return number of rows in the graph
|
||||
@ -401,16 +422,32 @@ create_staticcrsgraph( const std::string & label ,
|
||||
template< class DataType ,
|
||||
class Arg1Type ,
|
||||
class Arg2Type ,
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
typename SizeType ,
|
||||
class Arg3Type >
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type >::HostMirror
|
||||
create_mirror_view( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType,Arg3Type > & input );
|
||||
#else
|
||||
class Arg3Type ,
|
||||
typename SizeType >
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType >::HostMirror
|
||||
create_mirror_view( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType > & input );
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType >::HostMirror
|
||||
create_mirror_view( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,Arg3Type,SizeType > & input );
|
||||
#endif
|
||||
|
||||
template< class DataType ,
|
||||
class Arg1Type ,
|
||||
class Arg2Type ,
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
typename SizeType ,
|
||||
class Arg3Type >
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type >::HostMirror
|
||||
create_mirror_view( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType,Arg3Type > & input );
|
||||
#else
|
||||
class Arg3Type ,
|
||||
typename SizeType >
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType >::HostMirror
|
||||
create_mirror( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType > & input );
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType >::HostMirror
|
||||
create_mirror( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,Arg3Type,SizeType > & input );
|
||||
#endif
|
||||
|
||||
} // namespace Kokkos
|
||||
|
||||
@ -451,10 +488,17 @@ struct StaticCrsGraphMaximumEntry {
|
||||
|
||||
}
|
||||
|
||||
template< class DataType, class Arg1Type, class Arg2Type, typename SizeType >
|
||||
DataType maximum_entry( const StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType > & graph )
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
template< class DataType, class Arg1Type, class Arg2Type, typename SizeType , class Arg3Type >
|
||||
DataType maximum_entry( const StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type > & graph )
|
||||
{
|
||||
typedef StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType> GraphType ;
|
||||
typedef StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType,Arg3Type> GraphType ;
|
||||
#else
|
||||
template< class DataType, class Arg1Type, class Arg2Type, class Arg3Type, typename SizeType >
|
||||
DataType maximum_entry( const StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType > & graph )
|
||||
{
|
||||
typedef StaticCrsGraph<DataType,Arg1Type,Arg2Type,Arg3Type,SizeType> GraphType ;
|
||||
#endif
|
||||
typedef Impl::StaticCrsGraphMaximumEntry< GraphType > FunctorType ;
|
||||
|
||||
DataType result = 0 ;
|
||||
|
||||
@ -100,7 +100,7 @@ public:
|
||||
|
||||
|
||||
void resize(size_t n) {
|
||||
if(n>=capacity())
|
||||
if(n>=span())
|
||||
DV::resize(size_t (n*_extra_storage));
|
||||
_size = n;
|
||||
}
|
||||
@ -113,7 +113,7 @@ public:
|
||||
|
||||
/* Resize if necessary (behavour of std:vector) */
|
||||
|
||||
if(n>capacity())
|
||||
if(n>span())
|
||||
DV::resize(size_t (n*_extra_storage));
|
||||
_size = n;
|
||||
|
||||
@ -138,7 +138,7 @@ public:
|
||||
|
||||
void push_back(Scalar val) {
|
||||
DV::modified_host()++;
|
||||
if(_size == capacity()) {
|
||||
if(_size == span()) {
|
||||
size_t new_size = _size*_extra_storage;
|
||||
if(new_size == _size) new_size++;
|
||||
DV::resize(new_size);
|
||||
@ -159,7 +159,10 @@ public:
|
||||
|
||||
size_type size() const {return _size;}
|
||||
size_type max_size() const {return 2000000000;}
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
size_type capacity() const {return DV::capacity();}
|
||||
#endif
|
||||
size_type span() const {return DV::span();}
|
||||
bool empty() const {return _size==0;}
|
||||
|
||||
iterator begin() const {return &DV::h_view(0);}
|
||||
|
||||
@ -49,23 +49,45 @@
|
||||
|
||||
namespace Kokkos {
|
||||
|
||||
template< class DataType , class Arg1Type , class Arg2Type , typename SizeType >
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
template< class DataType , class Arg1Type , class Arg2Type , typename SizeType , class Arg3Type>
|
||||
inline
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType >::HostMirror
|
||||
create_mirror_view( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType > & view ,
|
||||
typename Impl::enable_if< ViewTraits<DataType,Arg1Type,Arg2Type,void>::is_hostspace >::type * = 0 )
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type >::HostMirror
|
||||
create_mirror_view( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType,Arg3Type > & view ,
|
||||
typename Impl::enable_if< ViewTraits<DataType,Arg1Type,Arg2Type,Arg3Type>::is_hostspace >::type * = 0 )
|
||||
{
|
||||
return view ;
|
||||
}
|
||||
|
||||
template< class DataType , class Arg1Type , class Arg2Type , typename SizeType >
|
||||
#else
|
||||
template< class DataType , class Arg1Type , class Arg2Type , class Arg3Type, typename SizeType >
|
||||
inline
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType >::HostMirror
|
||||
create_mirror( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType > & view )
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType >::HostMirror
|
||||
create_mirror_view( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,Arg3Type,SizeType > & view ,
|
||||
typename Impl::enable_if< ViewTraits<DataType,Arg1Type,Arg2Type,Arg3Type>::is_hostspace >::type * = 0 )
|
||||
{
|
||||
return view ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
template< class DataType , class Arg1Type , class Arg2Type , typename SizeType , class Arg3Type>
|
||||
inline
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type >::HostMirror
|
||||
create_mirror( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType,Arg3Type > & view )
|
||||
{
|
||||
// Force copy:
|
||||
//typedef Impl::ViewAssignment< Impl::ViewDefault > alloc ; // unused
|
||||
typedef StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType > staticcrsgraph_type ;
|
||||
typedef StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type > staticcrsgraph_type ;
|
||||
#else
|
||||
template< class DataType , class Arg1Type , class Arg2Type , class Arg3Type, typename SizeType >
|
||||
inline
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType >::HostMirror
|
||||
create_mirror( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,Arg3Type,SizeType > & view )
|
||||
{
|
||||
// Force copy:
|
||||
//typedef Impl::ViewAssignment< Impl::ViewDefault > alloc ; // unused
|
||||
typedef StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType > staticcrsgraph_type ;
|
||||
#endif
|
||||
|
||||
typename staticcrsgraph_type::HostMirror tmp ;
|
||||
typename staticcrsgraph_type::row_map_type::HostMirror tmp_row_map = create_mirror( view.row_map);
|
||||
@ -84,11 +106,19 @@ create_mirror( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType > & view
|
||||
return tmp ;
|
||||
}
|
||||
|
||||
template< class DataType , class Arg1Type , class Arg2Type , typename SizeType >
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
template< class DataType , class Arg1Type , class Arg2Type , typename SizeType , class Arg3Type>
|
||||
inline
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType >::HostMirror
|
||||
create_mirror_view( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType > & view ,
|
||||
typename Impl::enable_if< ! ViewTraits<DataType,Arg1Type,Arg2Type,void>::is_hostspace >::type * = 0 )
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , SizeType , Arg3Type >::HostMirror
|
||||
create_mirror_view( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,SizeType,Arg3Type > & view ,
|
||||
typename Impl::enable_if< ! ViewTraits<DataType,Arg1Type,Arg2Type,Arg3Type>::is_hostspace >::type * = 0 )
|
||||
#else
|
||||
template< class DataType , class Arg1Type , class Arg2Type , class Arg3Type, typename SizeType >
|
||||
inline
|
||||
typename StaticCrsGraph< DataType , Arg1Type , Arg2Type , Arg3Type , SizeType >::HostMirror
|
||||
create_mirror_view( const StaticCrsGraph<DataType,Arg1Type,Arg2Type,Arg3Type,SizeType > & view ,
|
||||
typename Impl::enable_if< ! ViewTraits<DataType,Arg1Type,Arg2Type,Arg3Type>::is_hostspace >::type * = 0 )
|
||||
#endif
|
||||
{
|
||||
return create_mirror( view );
|
||||
}
|
||||
@ -112,7 +142,8 @@ create_staticcrsgraph( const std::string & label ,
|
||||
|
||||
typedef View< typename output_type::size_type [] ,
|
||||
typename output_type::array_layout ,
|
||||
typename output_type::execution_space > work_type ;
|
||||
typename output_type::execution_space,
|
||||
typename output_type::memory_traits > work_type ;
|
||||
|
||||
output_type output ;
|
||||
|
||||
@ -157,7 +188,8 @@ create_staticcrsgraph( const std::string & label ,
|
||||
|
||||
typedef View< typename output_type::size_type [] ,
|
||||
typename output_type::array_layout ,
|
||||
typename output_type::execution_space > work_type ;
|
||||
typename output_type::execution_space,
|
||||
typename output_type::memory_traits > work_type ;
|
||||
|
||||
output_type output ;
|
||||
|
||||
|
||||
@ -14,7 +14,20 @@ ENDIF()
|
||||
IF(Kokkos_ENABLE_Pthread)
|
||||
TRIBITS_ADD_EXECUTABLE_AND_TEST(
|
||||
UnitTest_Threads
|
||||
SOURCES TestThreads.cpp UnitTestMain.cpp
|
||||
SOURCES
|
||||
UnitTestMain.cpp
|
||||
threads/TestThreads_BitSet.cpp
|
||||
threads/TestThreads_DualView.cpp
|
||||
threads/TestThreads_DynamicView.cpp
|
||||
threads/TestThreads_DynRankViewAPI_generic.cpp
|
||||
threads/TestThreads_DynRankViewAPI_rank12345.cpp
|
||||
threads/TestThreads_DynRankViewAPI_rank67.cpp
|
||||
threads/TestThreads_ErrorReporter.cpp
|
||||
threads/TestThreads_ScatterView.cpp
|
||||
threads/TestThreads_StaticCrsGraph.cpp
|
||||
threads/TestThreads_UnorderedMap.cpp
|
||||
threads/TestThreads_Vector.cpp
|
||||
threads/TestThreads_ViewCtorPropEmbeddedDim.cpp
|
||||
COMM serial mpi
|
||||
NUM_MPI_PROCS 1
|
||||
FAIL_REGULAR_EXPRESSION " FAILED "
|
||||
@ -25,7 +38,20 @@ ENDIF()
|
||||
IF(Kokkos_ENABLE_Serial)
|
||||
TRIBITS_ADD_EXECUTABLE_AND_TEST(
|
||||
UnitTest_Serial
|
||||
SOURCES TestSerial.cpp UnitTestMain.cpp
|
||||
SOURCES
|
||||
UnitTestMain.cpp
|
||||
serial/TestSerial_BitSet.cpp
|
||||
serial/TestSerial_DualView.cpp
|
||||
serial/TestSerial_DynamicView.cpp
|
||||
serial/TestSerial_DynRankViewAPI_generic.cpp
|
||||
serial/TestSerial_DynRankViewAPI_rank12345.cpp
|
||||
serial/TestSerial_DynRankViewAPI_rank67.cpp
|
||||
serial/TestSerial_ErrorReporter.cpp
|
||||
serial/TestSerial_ScatterView.cpp
|
||||
serial/TestSerial_StaticCrsGraph.cpp
|
||||
serial/TestSerial_UnorderedMap.cpp
|
||||
serial/TestSerial_Vector.cpp
|
||||
serial/TestSerial_ViewCtorPropEmbeddedDim.cpp
|
||||
COMM serial mpi
|
||||
NUM_MPI_PROCS 1
|
||||
FAIL_REGULAR_EXPRESSION " FAILED "
|
||||
@ -36,7 +62,20 @@ ENDIF()
|
||||
IF(Kokkos_ENABLE_OpenMP)
|
||||
TRIBITS_ADD_EXECUTABLE_AND_TEST(
|
||||
UnitTest_OpenMP
|
||||
SOURCES TestOpenMP.cpp UnitTestMain.cpp
|
||||
SOURCES
|
||||
UnitTestMain.cpp
|
||||
openmp/TestOpenMP_BitSet.cpp
|
||||
openmp/TestOpenMP_DualView.cpp
|
||||
openmp/TestOpenMP_DynamicView.cpp
|
||||
openmp/TestOpenMP_DynRankViewAPI_generic.cpp
|
||||
openmp/TestOpenMP_DynRankViewAPI_rank12345.cpp
|
||||
openmp/TestOpenMP_DynRankViewAPI_rank67.cpp
|
||||
openmp/TestOpenMP_ErrorReporter.cpp
|
||||
openmp/TestOpenMP_ScatterView.cpp
|
||||
openmp/TestOpenMP_StaticCrsGraph.cpp
|
||||
openmp/TestOpenMP_UnorderedMap.cpp
|
||||
openmp/TestOpenMP_Vector.cpp
|
||||
openmp/TestOpenMP_ViewCtorPropEmbeddedDim.cpp
|
||||
COMM serial mpi
|
||||
NUM_MPI_PROCS 1
|
||||
FAIL_REGULAR_EXPRESSION " FAILED "
|
||||
@ -47,7 +86,20 @@ ENDIF()
|
||||
IF(Kokkos_ENABLE_Cuda)
|
||||
TRIBITS_ADD_EXECUTABLE_AND_TEST(
|
||||
UnitTest_Cuda
|
||||
SOURCES TestCuda.cpp UnitTestMain.cpp
|
||||
SOURCES
|
||||
UnitTestMain.cpp
|
||||
cuda/TestCuda_BitSet.cpp
|
||||
cuda/TestCuda_DualView.cpp
|
||||
cuda/TestCuda_DynamicView.cpp
|
||||
cuda/TestCuda_DynRankViewAPI_generic.cpp
|
||||
cuda/TestCuda_DynRankViewAPI_rank12345.cpp
|
||||
cuda/TestCuda_DynRankViewAPI_rank67.cpp
|
||||
cuda/TestCuda_ErrorReporter.cpp
|
||||
cuda/TestCuda_ScatterView.cpp
|
||||
cuda/TestCuda_StaticCrsGraph.cpp
|
||||
cuda/TestCuda_UnorderedMap.cpp
|
||||
cuda/TestCuda_Vector.cpp
|
||||
cuda/TestCuda_ViewCtorPropEmbeddedDim.cpp
|
||||
COMM serial mpi
|
||||
NUM_MPI_PROCS 1
|
||||
FAIL_REGULAR_EXPRESSION " FAILED "
|
||||
|
||||
@ -3,6 +3,11 @@ KOKKOS_PATH = ../..
|
||||
GTEST_PATH = ../../TPL/gtest
|
||||
|
||||
vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests
|
||||
vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests/openmp
|
||||
vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests/serial
|
||||
vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests/threads
|
||||
vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests/rocm
|
||||
vpath %.cpp ${KOKKOS_PATH}/containers/unit_tests/cuda
|
||||
|
||||
default: build_all
|
||||
echo "End Build"
|
||||
@ -26,31 +31,91 @@ TEST_TARGETS =
|
||||
TARGETS =
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
|
||||
OBJ_CUDA = TestCuda.o UnitTestMain.o gtest-all.o
|
||||
OBJ_CUDA = UnitTestMain.o gtest-all.o
|
||||
OBJ_CUDA += TestCuda_BitSet.o
|
||||
OBJ_CUDA += TestCuda_DualView.o
|
||||
OBJ_CUDA += TestCuda_DynamicView.o
|
||||
OBJ_CUDA += TestCuda_DynRankViewAPI_generic.o
|
||||
OBJ_CUDA += TestCuda_DynRankViewAPI_rank12345.o
|
||||
OBJ_CUDA += TestCuda_DynRankViewAPI_rank67.o
|
||||
OBJ_CUDA += TestCuda_ErrorReporter.o
|
||||
OBJ_CUDA += TestCuda_ScatterView.o
|
||||
OBJ_CUDA += TestCuda_StaticCrsGraph.o
|
||||
OBJ_CUDA += TestCuda_UnorderedMap.o
|
||||
OBJ_CUDA += TestCuda_Vector.o
|
||||
OBJ_CUDA += TestCuda_ViewCtorPropEmbeddedDim.o
|
||||
TARGETS += KokkosContainers_UnitTest_Cuda
|
||||
TEST_TARGETS += test-cuda
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_ROCM), 1)
|
||||
OBJ_ROCM = TestROCm.o UnitTestMain.o gtest-all.o
|
||||
OBJ_ROCM = UnitTestMain.o gtest-all.o
|
||||
OBJ_ROCM += TestROCm_BitSet.o
|
||||
OBJ_ROCM += TestROCm_DualView.o
|
||||
OBJ_ROCM += TestROCm_DynamicView.o
|
||||
OBJ_ROCM += TestROCm_DynRankViewAPI_generic.o
|
||||
OBJ_ROCM += TestROCm_DynRankViewAPI_rank12345.o
|
||||
OBJ_ROCM += TestROCm_DynRankViewAPI_rank67.o
|
||||
OBJ_ROCM += TestROCm_ErrorReporter.o
|
||||
OBJ_ROCM += TestROCm_ScatterView.o
|
||||
OBJ_ROCM += TestROCm_StaticCrsGraph.o
|
||||
OBJ_ROCM += TestROCm_UnorderedMap.o
|
||||
OBJ_ROCM += TestROCm_Vector.o
|
||||
OBJ_ROCM += TestROCm_ViewCtorPropEmbeddedDim.o
|
||||
TARGETS += KokkosContainers_UnitTest_ROCm
|
||||
TEST_TARGETS += test-rocm
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
|
||||
OBJ_THREADS = TestThreads.o UnitTestMain.o gtest-all.o
|
||||
OBJ_THREADS = UnitTestMain.o gtest-all.o
|
||||
OBJ_THREADS += TestThreads_BitSet.o
|
||||
OBJ_THREADS += TestThreads_DualView.o
|
||||
OBJ_THREADS += TestThreads_DynamicView.o
|
||||
OBJ_THREADS += TestThreads_DynRankViewAPI_generic.o
|
||||
OBJ_THREADS += TestThreads_DynRankViewAPI_rank12345.o
|
||||
OBJ_THREADS += TestThreads_DynRankViewAPI_rank67.o
|
||||
OBJ_THREADS += TestThreads_ErrorReporter.o
|
||||
OBJ_THREADS += TestThreads_ScatterView.o
|
||||
OBJ_THREADS += TestThreads_StaticCrsGraph.o
|
||||
OBJ_THREADS += TestThreads_UnorderedMap.o
|
||||
OBJ_THREADS += TestThreads_Vector.o
|
||||
OBJ_THREADS += TestThreads_ViewCtorPropEmbeddedDim.o
|
||||
TARGETS += KokkosContainers_UnitTest_Threads
|
||||
TEST_TARGETS += test-threads
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
|
||||
OBJ_OPENMP = TestOpenMP.o UnitTestMain.o gtest-all.o
|
||||
OBJ_OPENMP = UnitTestMain.o gtest-all.o
|
||||
OBJ_OPENMP += TestOpenMP_BitSet.o
|
||||
OBJ_OPENMP += TestOpenMP_DualView.o
|
||||
OBJ_OPENMP += TestOpenMP_DynamicView.o
|
||||
OBJ_OPENMP += TestOpenMP_DynRankViewAPI_generic.o
|
||||
OBJ_OPENMP += TestOpenMP_DynRankViewAPI_rank12345.o
|
||||
OBJ_OPENMP += TestOpenMP_DynRankViewAPI_rank67.o
|
||||
OBJ_OPENMP += TestOpenMP_ErrorReporter.o
|
||||
OBJ_OPENMP += TestOpenMP_ScatterView.o
|
||||
OBJ_OPENMP += TestOpenMP_StaticCrsGraph.o
|
||||
OBJ_OPENMP += TestOpenMP_UnorderedMap.o
|
||||
OBJ_OPENMP += TestOpenMP_Vector.o
|
||||
OBJ_OPENMP += TestOpenMP_ViewCtorPropEmbeddedDim.o
|
||||
TARGETS += KokkosContainers_UnitTest_OpenMP
|
||||
TEST_TARGETS += test-openmp
|
||||
endif
|
||||
|
||||
ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
|
||||
OBJ_SERIAL = TestSerial.o UnitTestMain.o gtest-all.o
|
||||
OBJ_SERIAL = UnitTestMain.o gtest-all.o
|
||||
OBJ_SERIAL += TestSerial_BitSet.o
|
||||
OBJ_SERIAL += TestSerial_DualView.o
|
||||
OBJ_SERIAL += TestSerial_DynamicView.o
|
||||
OBJ_SERIAL += TestSerial_DynRankViewAPI_generic.o
|
||||
OBJ_SERIAL += TestSerial_DynRankViewAPI_rank12345.o
|
||||
OBJ_SERIAL += TestSerial_DynRankViewAPI_rank67.o
|
||||
OBJ_SERIAL += TestSerial_ErrorReporter.o
|
||||
OBJ_SERIAL += TestSerial_ScatterView.o
|
||||
OBJ_SERIAL += TestSerial_StaticCrsGraph.o
|
||||
OBJ_SERIAL += TestSerial_UnorderedMap.o
|
||||
OBJ_SERIAL += TestSerial_Vector.o
|
||||
OBJ_SERIAL += TestSerial_ViewCtorPropEmbeddedDim.o
|
||||
TARGETS += KokkosContainers_UnitTest_Serial
|
||||
TEST_TARGETS += test-serial
|
||||
endif
|
||||
|
||||
@ -44,7 +44,8 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <iostream>
|
||||
|
||||
#include <Kokkos_Core.hpp>
|
||||
#include <Kokkos_Bitset.hpp>
|
||||
|
||||
namespace Test {
|
||||
|
||||
@ -279,6 +280,11 @@ void test_bitset()
|
||||
|
||||
}
|
||||
|
||||
TEST_F( TEST_CATEGORY, bitset )
|
||||
{
|
||||
test_bitset<TEST_EXECSPACE>();
|
||||
}
|
||||
|
||||
} // namespace Test
|
||||
|
||||
#endif //KOKKOS_TEST_BITSET_HPP
|
||||
|
||||
@ -1,256 +0,0 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include <Kokkos_Macros.hpp>
|
||||
#ifdef KOKKOS_ENABLE_CUDA
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <cstdint>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <Kokkos_Core.hpp>
|
||||
|
||||
#include <Kokkos_Bitset.hpp>
|
||||
#include <Kokkos_UnorderedMap.hpp>
|
||||
#include <Kokkos_Vector.hpp>
|
||||
|
||||
#include <TestBitset.hpp>
|
||||
#include <TestUnorderedMap.hpp>
|
||||
#include <TestStaticCrsGraph.hpp>
|
||||
#include <TestVector.hpp>
|
||||
#include <TestDualView.hpp>
|
||||
#include <TestDynamicView.hpp>
|
||||
#include <TestScatterView.hpp>
|
||||
|
||||
#include <Kokkos_DynRankView.hpp>
|
||||
#include <TestDynViewAPI.hpp>
|
||||
|
||||
#include <Kokkos_ErrorReporter.hpp>
|
||||
#include <TestErrorReporter.hpp>
|
||||
|
||||
#include <TestViewCtorPropEmbeddedDim.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace Test {
|
||||
|
||||
class cuda : public ::testing::Test {
|
||||
protected:
|
||||
static void SetUpTestCase()
|
||||
{
|
||||
std::cout << std::setprecision(5) << std::scientific;
|
||||
}
|
||||
static void TearDownTestCase()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F( cuda , dyn_view_api) {
|
||||
TestDynViewAPI< double , Kokkos::Cuda >();
|
||||
}
|
||||
|
||||
TEST_F( cuda, viewctorprop_embedded_dim ) {
|
||||
TestViewCtorProp_EmbeddedDim< Kokkos::Cuda >::test_vcpt( 2, 3 );
|
||||
}
|
||||
|
||||
TEST_F( cuda , staticcrsgraph )
|
||||
{
|
||||
TestStaticCrsGraph::run_test_graph< Kokkos::Cuda >();
|
||||
TestStaticCrsGraph::run_test_graph2< Kokkos::Cuda >();
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(1, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(1, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(1, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(1, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(3, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(3, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(3, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(3, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(75, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(75, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(75, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Cuda >(75, 100000);
|
||||
}
|
||||
|
||||
|
||||
void cuda_test_insert_close( uint32_t num_nodes
|
||||
, uint32_t num_inserts
|
||||
, uint32_t num_duplicates
|
||||
)
|
||||
{
|
||||
test_insert< Kokkos::Cuda >( num_nodes, num_inserts, num_duplicates, true);
|
||||
}
|
||||
|
||||
void cuda_test_insert_far( uint32_t num_nodes
|
||||
, uint32_t num_inserts
|
||||
, uint32_t num_duplicates
|
||||
)
|
||||
{
|
||||
test_insert< Kokkos::Cuda >( num_nodes, num_inserts, num_duplicates, false);
|
||||
}
|
||||
|
||||
void cuda_test_failed_insert( uint32_t num_nodes )
|
||||
{
|
||||
test_failed_insert< Kokkos::Cuda >( num_nodes );
|
||||
}
|
||||
|
||||
void cuda_test_deep_copy( uint32_t num_nodes )
|
||||
{
|
||||
test_deep_copy< Kokkos::Cuda >( num_nodes );
|
||||
}
|
||||
|
||||
void cuda_test_vector_combinations(unsigned int size)
|
||||
{
|
||||
test_vector_combinations<int,Kokkos::Cuda>(size);
|
||||
}
|
||||
|
||||
void cuda_test_dualview_combinations(unsigned int size)
|
||||
{
|
||||
test_dualview_combinations<int,Kokkos::Cuda>(size);
|
||||
}
|
||||
|
||||
void cuda_test_bitset()
|
||||
{
|
||||
test_bitset<Kokkos::Cuda>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*TEST_F( cuda, bitset )
|
||||
{
|
||||
cuda_test_bitset();
|
||||
}*/
|
||||
|
||||
#define CUDA_INSERT_TEST( name, num_nodes, num_inserts, num_duplicates, repeat ) \
|
||||
TEST_F( cuda, UnorderedMap_insert_##name##_##num_nodes##_##num_inserts##_##num_duplicates##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
cuda_test_insert_##name(num_nodes,num_inserts,num_duplicates); \
|
||||
}
|
||||
|
||||
#define CUDA_FAILED_INSERT_TEST( num_nodes, repeat ) \
|
||||
TEST_F( cuda, UnorderedMap_failed_insert_##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
cuda_test_failed_insert(num_nodes); \
|
||||
}
|
||||
|
||||
#define CUDA_ASSIGNEMENT_TEST( num_nodes, repeat ) \
|
||||
TEST_F( cuda, UnorderedMap_assignment_operators_##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
cuda_test_assignment_operators(num_nodes); \
|
||||
}
|
||||
|
||||
#define CUDA_DEEP_COPY( num_nodes, repeat ) \
|
||||
TEST_F( cuda, UnorderedMap_deep_copy##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
cuda_test_deep_copy(num_nodes); \
|
||||
}
|
||||
|
||||
#define CUDA_VECTOR_COMBINE_TEST( size ) \
|
||||
TEST_F( cuda, vector_combination##size##x) { \
|
||||
cuda_test_vector_combinations(size); \
|
||||
}
|
||||
|
||||
#define CUDA_DUALVIEW_COMBINE_TEST( size ) \
|
||||
TEST_F( cuda, dualview_combination##size##x) { \
|
||||
cuda_test_dualview_combinations(size); \
|
||||
}
|
||||
|
||||
#define CUDA_SCATTERVIEW_TEST( size ) \
|
||||
TEST_F( cuda, scatterview_##size##x) { \
|
||||
test_scatter_view<Kokkos::Cuda>(size); \
|
||||
}
|
||||
|
||||
CUDA_DUALVIEW_COMBINE_TEST( 10 )
|
||||
CUDA_VECTOR_COMBINE_TEST( 10 )
|
||||
CUDA_VECTOR_COMBINE_TEST( 3057 )
|
||||
|
||||
CUDA_SCATTERVIEW_TEST( 10 )
|
||||
|
||||
CUDA_SCATTERVIEW_TEST( 1000000 )
|
||||
|
||||
CUDA_INSERT_TEST(close, 100000, 90000, 100, 500)
|
||||
CUDA_INSERT_TEST(far, 100000, 90000, 100, 500)
|
||||
CUDA_DEEP_COPY( 10000, 1 )
|
||||
CUDA_FAILED_INSERT_TEST( 10000, 1000 )
|
||||
|
||||
|
||||
#undef CUDA_INSERT_TEST
|
||||
#undef CUDA_FAILED_INSERT_TEST
|
||||
#undef CUDA_ASSIGNEMENT_TEST
|
||||
#undef CUDA_DEEP_COPY
|
||||
#undef CUDA_VECTOR_COMBINE_TEST
|
||||
#undef CUDA_DUALVIEW_COMBINE_TEST
|
||||
|
||||
|
||||
TEST_F( cuda , dynamic_view )
|
||||
{
|
||||
typedef TestDynamicView< double , Kokkos::CudaUVMSpace >
|
||||
TestDynView ;
|
||||
|
||||
for ( int i = 0 ; i < 10 ; ++i ) {
|
||||
TestDynView::run( 100000 + 100 * i );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if defined(KOKKOS_CLASS_LAMBDA)
|
||||
TEST_F(cuda, ErrorReporterViaLambda)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriverUseLambda<Kokkos::Cuda>>();
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_F(cuda, ErrorReporter)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriver<Kokkos::Cuda>>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
void KOKKOS_CONTAINERS_UNIT_TESTS_TESTCUDA_PREVENT_EMPTY_LINK_ERROR() {}
|
||||
#endif /* #ifdef KOKKOS_ENABLE_CUDA */
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <impl/Kokkos_Timer.hpp>
|
||||
#include <Kokkos_DualView.hpp>
|
||||
|
||||
namespace Test {
|
||||
|
||||
@ -115,6 +116,10 @@ void test_dualview_combinations(unsigned int size)
|
||||
|
||||
}
|
||||
|
||||
TEST_F( TEST_CATEGORY, dualview_combination) {
|
||||
test_dualview_combinations<int,TEST_EXECSPACE>(10);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Test
|
||||
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <Kokkos_DynRankView.hpp>
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
@ -723,6 +724,9 @@ public:
|
||||
|
||||
TestDynViewAPI()
|
||||
{
|
||||
}
|
||||
|
||||
static void run_tests() {
|
||||
run_test_resize_realloc();
|
||||
run_test_mirror();
|
||||
run_test_scalar();
|
||||
@ -731,10 +735,10 @@ public:
|
||||
run_test_subview();
|
||||
run_test_subview_strided();
|
||||
run_test_vector();
|
||||
}
|
||||
|
||||
static void run_operator_test_rank12345 () {
|
||||
TestViewOperator< T , device >::testit();
|
||||
TestViewOperator_LeftAndRight< int , device , 7 >::testit(2,3,4,2,3,4,2);
|
||||
TestViewOperator_LeftAndRight< int , device , 6 >::testit(2,3,4,2,3,4);
|
||||
TestViewOperator_LeftAndRight< int , device , 5 >::testit(2,3,4,2,3);
|
||||
TestViewOperator_LeftAndRight< int , device , 4 >::testit(2,3,4,2);
|
||||
TestViewOperator_LeftAndRight< int , device , 3 >::testit(2,3,4);
|
||||
@ -742,6 +746,11 @@ public:
|
||||
TestViewOperator_LeftAndRight< int , device , 1 >::testit(2);
|
||||
}
|
||||
|
||||
static void run_operator_test_rank67 () {
|
||||
TestViewOperator_LeftAndRight< int , device , 7 >::testit(2,3,4,2,3,4,2);
|
||||
TestViewOperator_LeftAndRight< int , device , 6 >::testit(2,3,4,2,3,4);
|
||||
}
|
||||
|
||||
static void run_test_resize_realloc()
|
||||
{
|
||||
dView0 drv0("drv0", 10, 20, 30);
|
||||
@ -772,7 +781,6 @@ public:
|
||||
ASSERT_EQ( a.rank() , am.rank() );
|
||||
ASSERT_EQ( ax.rank() , am.rank() );
|
||||
|
||||
if (Kokkos::HostSpace::execution_space::is_initialized() )
|
||||
{
|
||||
Kokkos::DynRankView<double, Kokkos::LayoutLeft, Kokkos::HostSpace> a_h("A",1000);
|
||||
auto a_h2 = Kokkos::create_mirror(Kokkos::HostSpace(),a_h);
|
||||
@ -792,7 +800,6 @@ public:
|
||||
ASSERT_EQ(a_h.rank(),a_h2.rank());
|
||||
ASSERT_EQ(a_h.rank(),a_d.rank());
|
||||
}
|
||||
if (Kokkos::HostSpace::execution_space::is_initialized() )
|
||||
{
|
||||
Kokkos::DynRankView<double, Kokkos::LayoutRight, Kokkos::HostSpace> a_h("A",1000);
|
||||
auto a_h2 = Kokkos::create_mirror(Kokkos::HostSpace(),a_h);
|
||||
@ -813,7 +820,6 @@ public:
|
||||
ASSERT_EQ(a_h.rank(),a_d.rank());
|
||||
}
|
||||
|
||||
if (Kokkos::HostSpace::execution_space::is_initialized() )
|
||||
{
|
||||
Kokkos::DynRankView<double, Kokkos::LayoutLeft, Kokkos::HostSpace> a_h("A",1000);
|
||||
auto a_h2 = Kokkos::create_mirror_view(Kokkos::HostSpace(),a_h);
|
||||
@ -834,7 +840,6 @@ public:
|
||||
ASSERT_EQ(a_h.rank(),a_h2.rank());
|
||||
ASSERT_EQ(a_h.rank(),a_d.rank());
|
||||
}
|
||||
if (Kokkos::HostSpace::execution_space::is_initialized() )
|
||||
{
|
||||
Kokkos::DynRankView<double, Kokkos::LayoutRight, Kokkos::HostSpace> a_h("A",1000);
|
||||
auto a_h2 = Kokkos::create_mirror_view(Kokkos::HostSpace(),a_h);
|
||||
@ -856,7 +861,6 @@ public:
|
||||
ASSERT_EQ(a_h.rank(),a_h2.rank());
|
||||
ASSERT_EQ(a_h.rank(),a_d.rank());
|
||||
}
|
||||
if (Kokkos::HostSpace::execution_space::is_initialized() )
|
||||
{
|
||||
typedef Kokkos::DynRankView< int , Kokkos::LayoutStride , Kokkos::HostSpace > view_stride_type ;
|
||||
unsigned order[] = { 6,5,4,3,2,1,0 }, dimen[] = { N0, N1, N2, 2, 2, 2, 2 }; //LayoutRight equivalent
|
||||
@ -1004,12 +1008,12 @@ public:
|
||||
ASSERT_TRUE( Kokkos::is_dyn_rank_view<dView0>::value );
|
||||
ASSERT_FALSE( Kokkos::is_dyn_rank_view< Kokkos::View<double> >::value );
|
||||
|
||||
ASSERT_TRUE( dx.ptr_on_device() == 0 ); //Okay with UVM
|
||||
ASSERT_TRUE( dy.ptr_on_device() == 0 ); //Okay with UVM
|
||||
ASSERT_TRUE( dz.ptr_on_device() == 0 ); //Okay with UVM
|
||||
ASSERT_TRUE( hx.ptr_on_device() == 0 );
|
||||
ASSERT_TRUE( hy.ptr_on_device() == 0 );
|
||||
ASSERT_TRUE( hz.ptr_on_device() == 0 );
|
||||
ASSERT_TRUE( dx.data() == 0 ); //Okay with UVM
|
||||
ASSERT_TRUE( dy.data() == 0 ); //Okay with UVM
|
||||
ASSERT_TRUE( dz.data() == 0 ); //Okay with UVM
|
||||
ASSERT_TRUE( hx.data() == 0 );
|
||||
ASSERT_TRUE( hy.data() == 0 );
|
||||
ASSERT_TRUE( hz.data() == 0 );
|
||||
ASSERT_EQ( dx.extent(0) , 0u ); //Okay with UVM
|
||||
ASSERT_EQ( dy.extent(0) , 0u ); //Okay with UVM
|
||||
ASSERT_EQ( dz.extent(0) , 0u ); //Okay with UVM
|
||||
@ -1052,7 +1056,7 @@ public:
|
||||
ASSERT_EQ( dx.use_count() , size_t(1) );
|
||||
|
||||
|
||||
dView0_unmanaged unmanaged_from_ptr_dx = dView0_unmanaged(dx.ptr_on_device(),
|
||||
dView0_unmanaged unmanaged_from_ptr_dx = dView0_unmanaged(dx.data(),
|
||||
dx.extent(0),
|
||||
dx.extent(1),
|
||||
dx.extent(2),
|
||||
@ -1061,7 +1065,7 @@ public:
|
||||
|
||||
{
|
||||
// Destruction of this view should be harmless
|
||||
const_dView0 unmanaged_from_ptr_const_dx( dx.ptr_on_device() ,
|
||||
const_dView0 unmanaged_from_ptr_const_dx( dx.data() ,
|
||||
dx.extent(0) ,
|
||||
dx.extent(1) ,
|
||||
dx.extent(2) ,
|
||||
@ -1089,11 +1093,11 @@ public:
|
||||
ASSERT_EQ( dx.use_count() , size_t(2) );
|
||||
|
||||
|
||||
ASSERT_FALSE( dx.ptr_on_device() == 0 );
|
||||
ASSERT_FALSE( const_dx.ptr_on_device() == 0 );
|
||||
ASSERT_FALSE( unmanaged_dx.ptr_on_device() == 0 );
|
||||
ASSERT_FALSE( unmanaged_from_ptr_dx.ptr_on_device() == 0 );
|
||||
ASSERT_FALSE( dy.ptr_on_device() == 0 );
|
||||
ASSERT_FALSE( dx.data() == 0 );
|
||||
ASSERT_FALSE( const_dx.data() == 0 );
|
||||
ASSERT_FALSE( unmanaged_dx.data() == 0 );
|
||||
ASSERT_FALSE( unmanaged_from_ptr_dx.data() == 0 );
|
||||
ASSERT_FALSE( dy.data() == 0 );
|
||||
ASSERT_NE( dx , dy );
|
||||
|
||||
ASSERT_EQ( dx.extent(0) , unsigned(N0) );
|
||||
@ -1106,7 +1110,7 @@ public:
|
||||
ASSERT_EQ( dy.extent(2) , unsigned(N2) );
|
||||
ASSERT_EQ( dy.extent(3) , unsigned(N3) );
|
||||
|
||||
ASSERT_EQ( unmanaged_from_ptr_dx.capacity(),unsigned(N0)*unsigned(N1)*unsigned(N2)*unsigned(N3) );
|
||||
ASSERT_EQ( unmanaged_from_ptr_dx.span(),unsigned(N0)*unsigned(N1)*unsigned(N2)*unsigned(N3) );
|
||||
|
||||
hx = Kokkos::create_mirror( dx );
|
||||
hy = Kokkos::create_mirror( dy );
|
||||
@ -1232,17 +1236,17 @@ public:
|
||||
dz = dy ; ASSERT_EQ( dy, dz); ASSERT_NE( dx, dz);
|
||||
|
||||
dx = dView0();
|
||||
ASSERT_TRUE( dx.ptr_on_device() == 0 );
|
||||
ASSERT_FALSE( dy.ptr_on_device() == 0 );
|
||||
ASSERT_FALSE( dz.ptr_on_device() == 0 );
|
||||
ASSERT_TRUE( dx.data() == 0 );
|
||||
ASSERT_FALSE( dy.data() == 0 );
|
||||
ASSERT_FALSE( dz.data() == 0 );
|
||||
dy = dView0();
|
||||
ASSERT_TRUE( dx.ptr_on_device() == 0 );
|
||||
ASSERT_TRUE( dy.ptr_on_device() == 0 );
|
||||
ASSERT_FALSE( dz.ptr_on_device() == 0 );
|
||||
ASSERT_TRUE( dx.data() == 0 );
|
||||
ASSERT_TRUE( dy.data() == 0 );
|
||||
ASSERT_FALSE( dz.data() == 0 );
|
||||
dz = dView0();
|
||||
ASSERT_TRUE( dx.ptr_on_device() == 0 );
|
||||
ASSERT_TRUE( dy.ptr_on_device() == 0 );
|
||||
ASSERT_TRUE( dz.ptr_on_device() == 0 );
|
||||
ASSERT_TRUE( dx.data() == 0 );
|
||||
ASSERT_TRUE( dy.data() == 0 );
|
||||
ASSERT_TRUE( dz.data() == 0 );
|
||||
|
||||
//View - DynRankView Interoperability tests
|
||||
// deep_copy from view to dynrankview
|
||||
@ -1303,7 +1307,7 @@ public:
|
||||
if ( ! std::is_same< typename device::execution_space , Kokkos::Cuda >::value )
|
||||
#endif
|
||||
{
|
||||
ASSERT_TRUE( x.ptr_on_device() == xr.ptr_on_device() );
|
||||
ASSERT_TRUE( x.data() == xr.data() );
|
||||
}
|
||||
|
||||
// typeX xf = xc ; // setting non-const from const must not compile
|
||||
@ -1362,13 +1366,13 @@ public:
|
||||
ASSERT_EQ( dr5.rank() , 5 );
|
||||
|
||||
// LayoutStride but arranged as LayoutRight
|
||||
// NOTE: unused arg_layout dimensions must be set to ~size_t(0) so that
|
||||
// NOTE: unused arg_layout dimensions must be set toKOKKOS_INVALID_INDEX so that
|
||||
// rank deduction can properly take place
|
||||
unsigned order5[] = { 4,3,2,1,0 }, dimen5[] = { N0, N1, N2, 2, 2 };
|
||||
Kokkos::LayoutStride ls = Kokkos::LayoutStride::order_dimensions(5, order5, dimen5);
|
||||
ls.dimension[5] = ~size_t(0);
|
||||
ls.dimension[6] = ~size_t(0);
|
||||
ls.dimension[7] = ~size_t(0);
|
||||
ls.dimension[5] =KOKKOS_INVALID_INDEX;
|
||||
ls.dimension[6] =KOKKOS_INVALID_INDEX;
|
||||
ls.dimension[7] =KOKKOS_INVALID_INDEX;
|
||||
sdView d5("d5", ls);
|
||||
ASSERT_EQ( d5.rank() , 5 );
|
||||
|
||||
@ -1381,7 +1385,7 @@ public:
|
||||
//
|
||||
// Explanation: In construction of the Kokkos::LayoutStride below, since the
|
||||
// remaining dimensions are not specified, they will default to values of 0
|
||||
// rather than ~size_t(0).
|
||||
// rather thanKOKKOS_INVALID_INDEX.
|
||||
// When passed to the DynRankView constructor the default dimensions (of 0)
|
||||
// will be counted toward the dynamic rank and returning an incorrect value
|
||||
// (i.e. rank 7 rather than 5).
|
||||
|
||||
50
lib/kokkos/containers/unit_tests/TestDynViewAPI_generic.hpp
Normal file
50
lib/kokkos/containers/unit_tests/TestDynViewAPI_generic.hpp
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<TestDynViewAPI.hpp>
|
||||
namespace Test {
|
||||
TEST_F( TEST_CATEGORY , dyn_rank_view_api_generic) {
|
||||
TestDynViewAPI< double , TEST_EXECSPACE >::run_tests();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<TestDynViewAPI.hpp>
|
||||
|
||||
namespace Test {
|
||||
TEST_F( TEST_CATEGORY , dyn_rank_view_api_operator_rank12345) {
|
||||
TestDynViewAPI< double , TEST_EXECSPACE >::run_operator_test_rank12345();
|
||||
}
|
||||
}
|
||||
|
||||
50
lib/kokkos/containers/unit_tests/TestDynViewAPI_rank67.hpp
Normal file
50
lib/kokkos/containers/unit_tests/TestDynViewAPI_rank67.hpp
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<TestDynViewAPI.hpp>
|
||||
namespace Test {
|
||||
TEST_F( TEST_CATEGORY , dyn_rank_view_api_operator_rank67) {
|
||||
TestDynViewAPI< double , TEST_EXECSPACE >::run_operator_test_rank67();
|
||||
}
|
||||
}
|
||||
|
||||
@ -240,6 +240,16 @@ struct TestDynamicView
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F( TEST_CATEGORY , dynamic_view )
|
||||
{
|
||||
typedef TestDynamicView< double , TEST_EXECSPACE >
|
||||
TestDynView ;
|
||||
|
||||
for ( int i = 0 ; i < 10 ; ++i ) {
|
||||
TestDynView::run( 100000 + 100 * i );
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Test
|
||||
|
||||
#endif /* #ifndef KOKKOS_TEST_DYNAMICVIEW_HPP */
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <iostream>
|
||||
#include <Kokkos_Core.hpp>
|
||||
#include <Kokkos_ErrorReporter.hpp>
|
||||
|
||||
namespace Test {
|
||||
|
||||
@ -223,6 +224,18 @@ struct ErrorReporterDriverNativeOpenMP : public ErrorReporterDriverBase<Kokkos::
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(KOKKOS_CLASS_LAMBDA)
|
||||
TEST_F(TEST_CATEGORY, ErrorReporterViaLambda)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriverUseLambda<TEST_EXECSPACE>>();
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_F(TEST_CATEGORY, ErrorReporter)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriver<TEST_EXECSPACE>>();
|
||||
}
|
||||
|
||||
} // namespace Test
|
||||
#endif // #ifndef KOKKOS_TEST_ERROR_REPORTING_HPP
|
||||
|
||||
|
||||
@ -1,212 +0,0 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include <Kokkos_Macros.hpp>
|
||||
#ifdef KOKKOS_ENABLE_OPENMP
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <Kokkos_Core.hpp>
|
||||
|
||||
#include <Kokkos_Bitset.hpp>
|
||||
#include <Kokkos_UnorderedMap.hpp>
|
||||
#include <Kokkos_Vector.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#include <TestBitset.hpp>
|
||||
#include <TestUnorderedMap.hpp>
|
||||
#include <TestStaticCrsGraph.hpp>
|
||||
#include <TestVector.hpp>
|
||||
#include <TestDualView.hpp>
|
||||
#include <TestDynamicView.hpp>
|
||||
|
||||
#include <Kokkos_DynRankView.hpp>
|
||||
#include <TestDynViewAPI.hpp>
|
||||
|
||||
#include <TestScatterView.hpp>
|
||||
|
||||
#include <Kokkos_ErrorReporter.hpp>
|
||||
#include <TestErrorReporter.hpp>
|
||||
|
||||
#include <TestViewCtorPropEmbeddedDim.hpp>
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
namespace Test {
|
||||
|
||||
class openmp : public ::testing::Test {
|
||||
protected:
|
||||
static void SetUpTestCase()
|
||||
{
|
||||
std::cout << std::setprecision(5) << std::scientific;
|
||||
}
|
||||
|
||||
static void TearDownTestCase()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F( openmp, dyn_view_api) {
|
||||
TestDynViewAPI< double , Kokkos::OpenMP >();
|
||||
}
|
||||
|
||||
TEST_F( openmp, viewctorprop_embedded_dim ) {
|
||||
TestViewCtorProp_EmbeddedDim< Kokkos::OpenMP >::test_vcpt( 2, 3 );
|
||||
}
|
||||
|
||||
TEST_F( openmp, bitset )
|
||||
{
|
||||
test_bitset<Kokkos::OpenMP>();
|
||||
}
|
||||
|
||||
TEST_F( openmp , staticcrsgraph )
|
||||
{
|
||||
TestStaticCrsGraph::run_test_graph< Kokkos::OpenMP >();
|
||||
TestStaticCrsGraph::run_test_graph2< Kokkos::OpenMP >();
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(1, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(1, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(1, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(1, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(3, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(3, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(3, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(3, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(75, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(75, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(75, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::OpenMP >(75, 100000);
|
||||
}
|
||||
|
||||
#define OPENMP_INSERT_TEST( name, num_nodes, num_inserts, num_duplicates, repeat, near ) \
|
||||
TEST_F( openmp, UnorderedMap_insert_##name##_##num_nodes##_##num_inserts##_##num_duplicates##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_insert<Kokkos::OpenMP>(num_nodes,num_inserts,num_duplicates, near); \
|
||||
}
|
||||
|
||||
#define OPENMP_FAILED_INSERT_TEST( num_nodes, repeat ) \
|
||||
TEST_F( openmp, UnorderedMap_failed_insert_##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_failed_insert<Kokkos::OpenMP>(num_nodes); \
|
||||
}
|
||||
|
||||
#define OPENMP_ASSIGNEMENT_TEST( num_nodes, repeat ) \
|
||||
TEST_F( openmp, UnorderedMap_assignment_operators_##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_assignement_operators<Kokkos::OpenMP>(num_nodes); \
|
||||
}
|
||||
|
||||
#define OPENMP_DEEP_COPY( num_nodes, repeat ) \
|
||||
TEST_F( openmp, UnorderedMap_deep_copy##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_deep_copy<Kokkos::OpenMP>(num_nodes); \
|
||||
}
|
||||
|
||||
#define OPENMP_VECTOR_COMBINE_TEST( size ) \
|
||||
TEST_F( openmp, vector_combination##size##x) { \
|
||||
test_vector_combinations<int,Kokkos::OpenMP>(size); \
|
||||
}
|
||||
|
||||
#define OPENMP_DUALVIEW_COMBINE_TEST( size ) \
|
||||
TEST_F( openmp, dualview_combination##size##x) { \
|
||||
test_dualview_combinations<int,Kokkos::OpenMP>(size); \
|
||||
}
|
||||
|
||||
#define OPENMP_SCATTERVIEW_TEST( size ) \
|
||||
TEST_F( openmp, scatterview_##size##x) { \
|
||||
test_scatter_view<Kokkos::OpenMP>(size); \
|
||||
}
|
||||
|
||||
OPENMP_INSERT_TEST(close, 100000, 90000, 100, 500, true)
|
||||
OPENMP_INSERT_TEST(far, 100000, 90000, 100, 500, false)
|
||||
OPENMP_FAILED_INSERT_TEST( 10000, 1000 )
|
||||
OPENMP_DEEP_COPY( 10000, 1 )
|
||||
|
||||
OPENMP_VECTOR_COMBINE_TEST( 10 )
|
||||
OPENMP_VECTOR_COMBINE_TEST( 3057 )
|
||||
OPENMP_DUALVIEW_COMBINE_TEST( 10 )
|
||||
|
||||
OPENMP_SCATTERVIEW_TEST( 10 )
|
||||
|
||||
OPENMP_SCATTERVIEW_TEST( 1000000 )
|
||||
|
||||
#undef OPENMP_INSERT_TEST
|
||||
#undef OPENMP_FAILED_INSERT_TEST
|
||||
#undef OPENMP_ASSIGNEMENT_TEST
|
||||
#undef OPENMP_DEEP_COPY
|
||||
#undef OPENMP_VECTOR_COMBINE_TEST
|
||||
#undef OPENMP_DUALVIEW_COMBINE_TEST
|
||||
|
||||
|
||||
TEST_F( openmp , dynamic_view )
|
||||
{
|
||||
typedef TestDynamicView< double , Kokkos::OpenMP >
|
||||
TestDynView ;
|
||||
|
||||
for ( int i = 0 ; i < 10 ; ++i ) {
|
||||
TestDynView::run( 100000 + 100 * i );
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(KOKKOS_CLASS_LAMBDA)
|
||||
TEST_F(openmp, ErrorReporterViaLambda)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriverUseLambda<Kokkos::OpenMP>>();
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_F(openmp, ErrorReporter)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriver<Kokkos::OpenMP>>();
|
||||
}
|
||||
|
||||
TEST_F(openmp, ErrorReporterNativeOpenMP)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriverNativeOpenMP>();
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
|
||||
#else
|
||||
void KOKKOS_CONTAINERS_UNIT_TESTS_TESTOPENMP_PREVENT_EMPTY_LINK_ERROR() {}
|
||||
#endif
|
||||
|
||||
@ -1,263 +0,0 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include <Kokkos_Macros.hpp>
|
||||
#ifdef KOKKOS_ENABLE_ROCM
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <cstdint>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <Kokkos_Core.hpp>
|
||||
|
||||
#include <Kokkos_Bitset.hpp>
|
||||
#include <Kokkos_UnorderedMap.hpp>
|
||||
#include <Kokkos_Vector.hpp>
|
||||
|
||||
#include <TestBitset.hpp>
|
||||
#include <TestUnorderedMap.hpp>
|
||||
#include <TestStaticCrsGraph.hpp>
|
||||
#include <TestVector.hpp>
|
||||
#include <TestDualView.hpp>
|
||||
#include <TestDynamicView.hpp>
|
||||
|
||||
#include <Kokkos_DynRankView.hpp>
|
||||
#include <TestDynViewAPI.hpp>
|
||||
|
||||
#include <Kokkos_ErrorReporter.hpp>
|
||||
#include <TestErrorReporter.hpp>
|
||||
|
||||
#include <TestViewCtorPropEmbeddedDim.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace Test {
|
||||
|
||||
class rocm : public ::testing::Test {
|
||||
protected:
|
||||
static void SetUpTestCase()
|
||||
{
|
||||
std::cout << std::setprecision(5) << std::scientific;
|
||||
Kokkos::HostSpace::execution_space::initialize();
|
||||
Kokkos::Experimental::ROCm::initialize( Kokkos::Experimental::ROCm::SelectDevice(0) );
|
||||
}
|
||||
static void TearDownTestCase()
|
||||
{
|
||||
Kokkos::Experimental::ROCm::finalize();
|
||||
Kokkos::HostSpace::execution_space::finalize();
|
||||
}
|
||||
};
|
||||
|
||||
#if !defined(KOKKOS_ENABLE_ROCM)
|
||||
//issue 964
|
||||
TEST_F( rocm , dyn_view_api) {
|
||||
TestDynViewAPI< double , Kokkos::Experimental::ROCm >();
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_F( rocm, viewctorprop_embedded_dim ) {
|
||||
TestViewCtorProp_EmbeddedDim< Kokkos::Experimental::ROCm >::test_vcpt( 2, 3 );
|
||||
}
|
||||
|
||||
TEST_F( rocm , staticcrsgraph )
|
||||
{
|
||||
TestStaticCrsGraph::run_test_graph< Kokkos::Experimental::ROCm >();
|
||||
TestStaticCrsGraph::run_test_graph2< Kokkos::Experimental::ROCm >();
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(1, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(1, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(1, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(1, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(3, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(3, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(3, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(3, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(75, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(75, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(75, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Experimental::ROCm >(75, 100000);
|
||||
}
|
||||
|
||||
|
||||
#if !defined(KOKKOS_ENABLE_ROCM)
|
||||
// issue 1089
|
||||
// same as 130203 (MemPool, static member function link issue
|
||||
void rocm_test_insert_close( uint32_t num_nodes
|
||||
, uint32_t num_inserts
|
||||
, uint32_t num_duplicates
|
||||
)
|
||||
{
|
||||
test_insert< Kokkos::Experimental::ROCm >( num_nodes, num_inserts, num_duplicates, true);
|
||||
}
|
||||
|
||||
// hcc link error , Referencing function in another module!
|
||||
void rocm_test_insert_far( uint32_t num_nodes
|
||||
, uint32_t num_inserts
|
||||
, uint32_t num_duplicates
|
||||
)
|
||||
{
|
||||
test_insert< Kokkos::Experimental::ROCm >( num_nodes, num_inserts, num_duplicates, false);
|
||||
}
|
||||
|
||||
void rocm_test_failed_insert( uint32_t num_nodes )
|
||||
{
|
||||
test_failed_insert< Kokkos::Experimental::ROCm >( num_nodes );
|
||||
}
|
||||
|
||||
void rocm_test_deep_copy( uint32_t num_nodes )
|
||||
{
|
||||
test_deep_copy< Kokkos::Experimental::ROCm >( num_nodes );
|
||||
}
|
||||
|
||||
void rocm_test_vector_combinations(unsigned int size)
|
||||
{
|
||||
test_vector_combinations<int,Kokkos::Experimental::ROCm>(size);
|
||||
}
|
||||
|
||||
void rocm_test_dualview_combinations(unsigned int size)
|
||||
{
|
||||
test_dualview_combinations<int,Kokkos::Experimental::ROCm>(size);
|
||||
}
|
||||
|
||||
void rocm_test_bitset()
|
||||
{
|
||||
test_bitset<Kokkos::Experimental::ROCm>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*TEST_F( rocm, bitset )
|
||||
{
|
||||
rocm_test_bitset();
|
||||
}*/
|
||||
|
||||
#define ROCM_INSERT_TEST( name, num_nodes, num_inserts, num_duplicates, repeat ) \
|
||||
TEST_F( rocm, UnorderedMap_insert_##name##_##num_nodes##_##num_inserts##_##num_duplicates##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
rocm_test_insert_##name(num_nodes,num_inserts,num_duplicates); \
|
||||
}
|
||||
|
||||
#define ROCM_FAILED_INSERT_TEST( num_nodes, repeat ) \
|
||||
TEST_F( rocm, UnorderedMap_failed_insert_##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
rocm_test_failed_insert(num_nodes); \
|
||||
}
|
||||
|
||||
#define ROCM_ASSIGNEMENT_TEST( num_nodes, repeat ) \
|
||||
TEST_F( rocm, UnorderedMap_assignment_operators_##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
rocm_test_assignment_operators(num_nodes); \
|
||||
}
|
||||
|
||||
#define ROCM_DEEP_COPY( num_nodes, repeat ) \
|
||||
TEST_F( rocm, UnorderedMap_deep_copy##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
rocm_test_deep_copy(num_nodes); \
|
||||
}
|
||||
|
||||
#define ROCM_VECTOR_COMBINE_TEST( size ) \
|
||||
TEST_F( rocm, vector_combination##size##x) { \
|
||||
rocm_test_vector_combinations(size); \
|
||||
}
|
||||
|
||||
#define ROCM_DUALVIEW_COMBINE_TEST( size ) \
|
||||
TEST_F( rocm, dualview_combination##size##x) { \
|
||||
rocm_test_dualview_combinations(size); \
|
||||
}
|
||||
|
||||
//ROCM_DUALVIEW_COMBINE_TEST( 10 )
|
||||
//ROCM_VECTOR_COMBINE_TEST( 10 )
|
||||
//ROCM_VECTOR_COMBINE_TEST( 3057 )
|
||||
|
||||
|
||||
//ROCM_INSERT_TEST(close, 100000, 90000, 100, 500)
|
||||
//ROCM_INSERT_TEST(far, 100000, 90000, 100, 500)
|
||||
//ROCM_DEEP_COPY( 10000, 1 )
|
||||
//ROCM_FAILED_INSERT_TEST( 10000, 1000 )
|
||||
|
||||
|
||||
#undef ROCM_INSERT_TEST
|
||||
#undef ROCM_FAILED_INSERT_TEST
|
||||
#undef ROCM_ASSIGNEMENT_TEST
|
||||
#undef ROCM_DEEP_COPY
|
||||
#undef ROCM_VECTOR_COMBINE_TEST
|
||||
#undef ROCM_DUALVIEW_COMBINE_TEST
|
||||
|
||||
|
||||
#endif
|
||||
#if !defined(KOKKOS_ENABLE_ROCM)
|
||||
//static member function issue
|
||||
TEST_F( rocm , dynamic_view )
|
||||
{
|
||||
// typedef TestDynamicView< double , Kokkos::ROCmUVMSpace >
|
||||
typedef TestDynamicView< double , Kokkos::Experimental::ROCmSpace >
|
||||
TestDynView ;
|
||||
|
||||
for ( int i = 0 ; i < 10 ; ++i ) {
|
||||
TestDynView::run( 100000 + 100 * i );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(KOKKOS_CLASS_LAMBDA)
|
||||
TEST_F(rocm, ErrorReporterViaLambda)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriverUseLambda<Kokkos::Experimental::ROCm>>();
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_F(rocm, ErrorReporter)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriver<Kokkos::Experimental::ROCm>>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
void KOKKOS_CONTAINERS_UNIT_TESTS_TESTROCM_PREVENT_EMPTY_LINK_ERROR() {}
|
||||
#endif /* #ifdef KOKKOS_ENABLE_ROCM */
|
||||
|
||||
@ -149,6 +149,11 @@ void test_scatter_view(int n)
|
||||
TestDuplicatedScatterView<ExecSpace> duptest(n);
|
||||
}
|
||||
|
||||
TEST_F( TEST_CATEGORY, scatterview) {
|
||||
test_scatter_view<TEST_EXECSPACE>(10);
|
||||
test_scatter_view<TEST_EXECSPACE>(10000000);
|
||||
}
|
||||
|
||||
} // namespace Test
|
||||
|
||||
#endif //KOKKOS_TEST_UNORDERED_MAP_HPP
|
||||
|
||||
@ -1,203 +0,0 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include <Kokkos_Macros.hpp>
|
||||
#ifdef KOKKOS_ENABLE_SERIAL
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <Kokkos_Core.hpp>
|
||||
|
||||
#include <Kokkos_Bitset.hpp>
|
||||
#include <Kokkos_UnorderedMap.hpp>
|
||||
#include <Kokkos_Vector.hpp>
|
||||
|
||||
#include <TestBitset.hpp>
|
||||
#include <TestUnorderedMap.hpp>
|
||||
#include <TestStaticCrsGraph.hpp>
|
||||
#include <TestVector.hpp>
|
||||
#include <TestDualView.hpp>
|
||||
#include <TestDynamicView.hpp>
|
||||
#include <TestScatterView.hpp>
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
#include <Kokkos_DynRankView.hpp>
|
||||
#include <TestDynViewAPI.hpp>
|
||||
|
||||
#include <Kokkos_ErrorReporter.hpp>
|
||||
#include <TestErrorReporter.hpp>
|
||||
|
||||
#include <TestViewCtorPropEmbeddedDim.hpp>
|
||||
|
||||
namespace Test {
|
||||
|
||||
class serial : public ::testing::Test {
|
||||
protected:
|
||||
static void SetUpTestCase () {
|
||||
std::cout << std::setprecision(5) << std::scientific;
|
||||
}
|
||||
|
||||
static void TearDownTestCase () {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F( serial, dyn_view_api) {
|
||||
TestDynViewAPI< double , Kokkos::Serial >();
|
||||
}
|
||||
|
||||
TEST_F( serial, viewctorprop_embedded_dim ) {
|
||||
TestViewCtorProp_EmbeddedDim< Kokkos::Serial >::test_vcpt( 2, 3 );
|
||||
}
|
||||
|
||||
TEST_F( serial , staticcrsgraph )
|
||||
{
|
||||
TestStaticCrsGraph::run_test_graph< Kokkos::Serial >();
|
||||
TestStaticCrsGraph::run_test_graph2< Kokkos::Serial >();
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(1, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(1, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(1, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(1, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(3, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(3, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(3, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(3, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(75, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(75, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(75, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Serial >(75, 100000);
|
||||
}
|
||||
|
||||
TEST_F( serial, bitset )
|
||||
{
|
||||
test_bitset<Kokkos::Serial> ();
|
||||
}
|
||||
|
||||
#define SERIAL_INSERT_TEST( name, num_nodes, num_inserts, num_duplicates, repeat, near ) \
|
||||
TEST_F( serial, UnorderedMap_insert_##name##_##num_nodes##_##num_inserts##_##num_duplicates##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_insert<Kokkos::Serial> (num_nodes, num_inserts, num_duplicates, near); \
|
||||
}
|
||||
|
||||
#define SERIAL_FAILED_INSERT_TEST( num_nodes, repeat ) \
|
||||
TEST_F( serial, UnorderedMap_failed_insert_##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_failed_insert<Kokkos::Serial> (num_nodes); \
|
||||
}
|
||||
|
||||
#define SERIAL_ASSIGNEMENT_TEST( num_nodes, repeat ) \
|
||||
TEST_F( serial, UnorderedMap_assignment_operators_##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_assignement_operators<Kokkos::Serial> (num_nodes); \
|
||||
}
|
||||
|
||||
#define SERIAL_DEEP_COPY( num_nodes, repeat ) \
|
||||
TEST_F( serial, UnorderedMap_deep_copy##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_deep_copy<Kokkos::Serial> (num_nodes); \
|
||||
}
|
||||
|
||||
#define SERIAL_VECTOR_COMBINE_TEST( size ) \
|
||||
TEST_F( serial, vector_combination##size##x) { \
|
||||
test_vector_combinations<int,Kokkos::Serial>(size); \
|
||||
}
|
||||
|
||||
#define SERIAL_DUALVIEW_COMBINE_TEST( size ) \
|
||||
TEST_F( serial, dualview_combination##size##x) { \
|
||||
test_dualview_combinations<int,Kokkos::Serial>(size); \
|
||||
}
|
||||
|
||||
#define SERIAL_SCATTERVIEW_TEST( size ) \
|
||||
TEST_F( serial, scatterview_##size##x) { \
|
||||
test_scatter_view<Kokkos::Serial>(size); \
|
||||
}
|
||||
|
||||
SERIAL_INSERT_TEST(close, 100000, 90000, 100, 500, true)
|
||||
SERIAL_INSERT_TEST(far, 100000, 90000, 100, 500, false)
|
||||
SERIAL_FAILED_INSERT_TEST( 10000, 1000 )
|
||||
SERIAL_DEEP_COPY( 10000, 1 )
|
||||
|
||||
SERIAL_VECTOR_COMBINE_TEST( 10 )
|
||||
SERIAL_VECTOR_COMBINE_TEST( 3057 )
|
||||
SERIAL_DUALVIEW_COMBINE_TEST( 10 )
|
||||
|
||||
SERIAL_SCATTERVIEW_TEST( 10 )
|
||||
|
||||
SERIAL_SCATTERVIEW_TEST( 1000000 )
|
||||
|
||||
#undef SERIAL_INSERT_TEST
|
||||
#undef SERIAL_FAILED_INSERT_TEST
|
||||
#undef SERIAL_ASSIGNEMENT_TEST
|
||||
#undef SERIAL_DEEP_COPY
|
||||
#undef SERIAL_VECTOR_COMBINE_TEST
|
||||
#undef SERIAL_DUALVIEW_COMBINE_TEST
|
||||
|
||||
TEST_F( serial , dynamic_view )
|
||||
{
|
||||
typedef TestDynamicView< double , Kokkos::Serial >
|
||||
TestDynView ;
|
||||
|
||||
for ( int i = 0 ; i < 10 ; ++i ) {
|
||||
TestDynView::run( 100000 + 100 * i );
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(KOKKOS_CLASS_LAMBDA)
|
||||
TEST_F(serial, ErrorReporterViaLambda)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriverUseLambda<Kokkos::Serial>>();
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_F(serial, ErrorReporter)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriver<Kokkos::Serial>>();
|
||||
}
|
||||
|
||||
|
||||
} // namespace Test
|
||||
|
||||
#else
|
||||
void KOKKOS_CONTAINERS_UNIT_TESTS_TESTSERIAL_PREVENT_EMPTY_LINK_ERROR() {}
|
||||
#endif // KOKKOS_ENABLE_SERIAL
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
#include <Kokkos_StaticCrsGraph.hpp>
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
namespace Test {
|
||||
namespace TestStaticCrsGraph {
|
||||
|
||||
template< class Space >
|
||||
@ -193,5 +193,91 @@ void run_test_graph3(size_t B, size_t N)
|
||||
}
|
||||
}
|
||||
|
||||
template< class Space >
|
||||
void run_test_graph4()
|
||||
{
|
||||
typedef unsigned ordinal_type;
|
||||
typedef Kokkos::LayoutRight layout_type;
|
||||
typedef Space space_type;
|
||||
typedef Kokkos::MemoryUnmanaged memory_traits_type;
|
||||
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
typedef Kokkos::StaticCrsGraph< ordinal_type , layout_type , space_type , ordinal_type , memory_traits_type > dView ;
|
||||
#else
|
||||
typedef Kokkos::StaticCrsGraph< ordinal_type , layout_type , space_type , memory_traits_type > dView ;
|
||||
#endif
|
||||
typedef typename dView::HostMirror hView ;
|
||||
|
||||
dView dx ;
|
||||
|
||||
// StaticCrsGraph with Unmanaged trait will contain row_map and entries members
|
||||
// with the Unmanaged memory trait.
|
||||
// Use of such a StaticCrsGraph requires an allocaton of memory for the unmanaged views
|
||||
// to wrap.
|
||||
//
|
||||
// In this test, a graph (via raw arrays) resides on the host.
|
||||
// The pointers are wrapped by unmanaged Views.
|
||||
// To make use of this on the device, managed device Views are created (allocation required),
|
||||
// and data from the unmanaged host views is deep copied to the device Views
|
||||
// Unmanaged views of the appropriate type wrap the device data and are assigned to
|
||||
// their corresponding unmanaged view members of the unmanaged StaticCrsGraph
|
||||
|
||||
// Data types for raw pointers storing StaticCrsGraph info
|
||||
typedef typename dView::size_type ptr_row_map_type;
|
||||
typedef typename dView::data_type ptr_entries_type;
|
||||
|
||||
const ordinal_type numRows = 8;
|
||||
const ordinal_type nnz = 24;
|
||||
ptr_row_map_type ptrRaw[] = {0, 4, 8, 10, 12, 14, 16, 20, 24};
|
||||
ptr_entries_type indRaw[] = {0, 1, 4, 5, 0, 1, 4, 5, 2, 3, 2, 3, 4, 5, 4, 5, 2, 3, 6, 7, 2, 3, 6, 7};
|
||||
|
||||
// Wrap pointers in unmanaged host views
|
||||
typedef typename hView::row_map_type local_row_map_type ;
|
||||
typedef typename hView::entries_type local_entries_type ;
|
||||
local_row_map_type unman_row_map( &(ptrRaw[0]) , numRows+1 );
|
||||
local_entries_type unman_entries( &(indRaw[0]) , nnz );
|
||||
|
||||
hView hx ;
|
||||
hx = hView( unman_entries, unman_row_map );
|
||||
|
||||
// Create the device Views for copying the host arrays into
|
||||
// An allocation is needed on the device for the unmanaged StaticCrsGraph to wrap the pointer
|
||||
typedef typename Kokkos::View< ptr_row_map_type*, layout_type, space_type > d_row_map_view_type;
|
||||
typedef typename Kokkos::View< ptr_entries_type*, layout_type, space_type > d_entries_view_type;
|
||||
|
||||
d_row_map_view_type tmp_row_map( "tmp_row_map", numRows+1 );
|
||||
d_entries_view_type tmp_entries( "tmp_entries", nnz );
|
||||
|
||||
Kokkos::deep_copy (tmp_row_map, unman_row_map);
|
||||
Kokkos::deep_copy (tmp_entries, unman_entries);
|
||||
|
||||
// Wrap the pointer in unmanaged View and assign to the corresponding StaticCrsGraph member
|
||||
dx.row_map = typename dView::row_map_type(tmp_row_map.data(), numRows+1);
|
||||
dx.entries = typename dView::entries_type(tmp_entries.data(), nnz);
|
||||
|
||||
ASSERT_TRUE((std::is_same< typename dView::row_map_type::memory_traits , Kokkos::MemoryUnmanaged >::value));
|
||||
ASSERT_TRUE((std::is_same< typename dView::entries_type::memory_traits , Kokkos::MemoryUnmanaged >::value));
|
||||
ASSERT_TRUE((std::is_same< typename hView::row_map_type::memory_traits , Kokkos::MemoryUnmanaged >::value));
|
||||
ASSERT_TRUE((std::is_same< typename hView::entries_type::memory_traits , Kokkos::MemoryUnmanaged >::value));
|
||||
}
|
||||
|
||||
} /* namespace TestStaticCrsGraph */
|
||||
|
||||
TEST_F( TEST_CATEGORY , staticcrsgraph )
|
||||
{
|
||||
TestStaticCrsGraph::run_test_graph< TEST_EXECSPACE >();
|
||||
TestStaticCrsGraph::run_test_graph2< TEST_EXECSPACE >();
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(1, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(1, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(1, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(1, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(3, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(3, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(3, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(3, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(75, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(75, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(75, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< TEST_EXECSPACE >(75, 100000);
|
||||
TestStaticCrsGraph::run_test_graph4< TEST_EXECSPACE >();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,199 +0,0 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include <Kokkos_Macros.hpp>
|
||||
#ifdef KOKKOS_ENABLE_THREADS
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <Kokkos_Core.hpp>
|
||||
|
||||
#include <Kokkos_Bitset.hpp>
|
||||
#include <Kokkos_UnorderedMap.hpp>
|
||||
|
||||
#include <Kokkos_Vector.hpp>
|
||||
#include <iomanip>
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#include <TestBitset.hpp>
|
||||
#include <TestUnorderedMap.hpp>
|
||||
#include <TestStaticCrsGraph.hpp>
|
||||
|
||||
#include <TestVector.hpp>
|
||||
#include <TestDualView.hpp>
|
||||
#include <TestDynamicView.hpp>
|
||||
|
||||
#include <Kokkos_DynRankView.hpp>
|
||||
#include <TestDynViewAPI.hpp>
|
||||
|
||||
#include <Kokkos_ErrorReporter.hpp>
|
||||
#include <TestErrorReporter.hpp>
|
||||
|
||||
#include <TestViewCtorPropEmbeddedDim.hpp>
|
||||
|
||||
namespace Test {
|
||||
|
||||
class threads : public ::testing::Test {
|
||||
protected:
|
||||
static void SetUpTestCase()
|
||||
{
|
||||
std::cout << std::setprecision(5) << std::scientific;
|
||||
}
|
||||
|
||||
static void TearDownTestCase()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F( threads , dyn_view_api) {
|
||||
TestDynViewAPI< double , Kokkos::Threads >();
|
||||
}
|
||||
|
||||
TEST_F( threads, viewctorprop_embedded_dim ) {
|
||||
TestViewCtorProp_EmbeddedDim< Kokkos::Threads >::test_vcpt( 2, 3 );
|
||||
}
|
||||
|
||||
TEST_F( threads , staticcrsgraph )
|
||||
{
|
||||
TestStaticCrsGraph::run_test_graph< Kokkos::Threads >();
|
||||
TestStaticCrsGraph::run_test_graph2< Kokkos::Threads >();
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(1, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(1, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(1, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(1, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(3, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(3, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(3, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(3, 100000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(75, 0);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(75, 1000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(75, 10000);
|
||||
TestStaticCrsGraph::run_test_graph3< Kokkos::Threads >(75, 100000);
|
||||
}
|
||||
|
||||
/*TEST_F( threads, bitset )
|
||||
{
|
||||
test_bitset<Kokkos::Threads>();
|
||||
}*/
|
||||
|
||||
#define THREADS_INSERT_TEST( name, num_nodes, num_inserts, num_duplicates, repeat, near ) \
|
||||
TEST_F( threads, UnorderedMap_insert_##name##_##num_nodes##_##num_inserts##_##num_duplicates##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_insert<Kokkos::Threads>(num_nodes,num_inserts,num_duplicates, near); \
|
||||
}
|
||||
|
||||
#define THREADS_FAILED_INSERT_TEST( num_nodes, repeat ) \
|
||||
TEST_F( threads, UnorderedMap_failed_insert_##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_failed_insert<Kokkos::Threads>(num_nodes); \
|
||||
}
|
||||
|
||||
#define THREADS_ASSIGNEMENT_TEST( num_nodes, repeat ) \
|
||||
TEST_F( threads, UnorderedMap_assignment_operators_##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_assignement_operators<Kokkos::Threads>(num_nodes); \
|
||||
}
|
||||
|
||||
#define THREADS_DEEP_COPY( num_nodes, repeat ) \
|
||||
TEST_F( threads, UnorderedMap_deep_copy##num_nodes##_##repeat##x) { \
|
||||
for (int i=0; i<repeat; ++i) \
|
||||
test_deep_copy<Kokkos::Threads>(num_nodes); \
|
||||
}
|
||||
|
||||
#define THREADS_VECTOR_COMBINE_TEST( size ) \
|
||||
TEST_F( threads, vector_combination##size##x) { \
|
||||
test_vector_combinations<int,Kokkos::Threads>(size); \
|
||||
}
|
||||
|
||||
#define THREADS_DUALVIEW_COMBINE_TEST( size ) \
|
||||
TEST_F( threads, dualview_combination##size##x) { \
|
||||
test_dualview_combinations<int,Kokkos::Threads>(size); \
|
||||
}
|
||||
|
||||
THREADS_INSERT_TEST(far, 100000, 90000, 100, 500, false)
|
||||
THREADS_FAILED_INSERT_TEST( 10000, 1000 )
|
||||
THREADS_DEEP_COPY( 10000, 1 )
|
||||
|
||||
THREADS_VECTOR_COMBINE_TEST( 10 )
|
||||
THREADS_VECTOR_COMBINE_TEST( 3057 )
|
||||
THREADS_DUALVIEW_COMBINE_TEST( 10 )
|
||||
|
||||
|
||||
#undef THREADS_INSERT_TEST
|
||||
#undef THREADS_FAILED_INSERT_TEST
|
||||
#undef THREADS_ASSIGNEMENT_TEST
|
||||
#undef THREADS_DEEP_COPY
|
||||
#undef THREADS_VECTOR_COMBINE_TEST
|
||||
#undef THREADS_DUALVIEW_COMBINE_TEST
|
||||
|
||||
|
||||
TEST_F( threads , dynamic_view )
|
||||
{
|
||||
typedef TestDynamicView< double , Kokkos::Threads >
|
||||
TestDynView ;
|
||||
|
||||
for ( int i = 0 ; i < 10 ; ++i ) {
|
||||
TestDynView::run( 100000 + 100 * i );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if defined(KOKKOS_CLASS_LAMBDA)
|
||||
TEST_F(threads, ErrorReporterViaLambda)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriverUseLambda<Kokkos::Threads>>();
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_F(threads, ErrorReporter)
|
||||
{
|
||||
TestErrorReporter<ErrorReporterDriver<Kokkos::Threads>>();
|
||||
}
|
||||
|
||||
} // namespace Test
|
||||
|
||||
#else
|
||||
void KOKKOS_CONTAINERS_UNIT_TESTS_TESTTHREADS_PREVENT_EMPTY_LINK_ERROR() {}
|
||||
#endif /* #if defined( KOKKOS_ENABLE_THREADS ) */
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <iostream>
|
||||
|
||||
#include <Kokkos_UnorderedMap.hpp>
|
||||
|
||||
namespace Test {
|
||||
|
||||
@ -308,6 +308,23 @@ void test_deep_copy( uint32_t num_nodes )
|
||||
|
||||
}
|
||||
|
||||
TEST_F( TEST_CATEGORY, UnorderedMap_insert) {
|
||||
for (int i=0; i<500; ++i) {
|
||||
test_insert<TEST_EXECSPACE>(100000, 90000, 100, true);
|
||||
test_insert<TEST_EXECSPACE>(100000, 90000, 100, false);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F( TEST_CATEGORY, UnorderedMap_failed_insert) {
|
||||
for (int i=0; i<1000; ++i)
|
||||
test_failed_insert<TEST_EXECSPACE>(10000);
|
||||
}
|
||||
|
||||
TEST_F( TEST_CATEGORY, UnorderedMap_deep_copy) {
|
||||
for (int i=0; i<2; ++i)
|
||||
test_deep_copy<TEST_EXECSPACE>(10000);
|
||||
}
|
||||
|
||||
} // namespace Test
|
||||
|
||||
#endif //KOKKOS_TEST_UNORDERED_MAP_HPP
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <impl/Kokkos_Timer.hpp>
|
||||
#include <Kokkos_Vector.hpp>
|
||||
|
||||
namespace Test {
|
||||
|
||||
@ -125,6 +125,10 @@ void test_vector_combinations(unsigned int size)
|
||||
ASSERT_EQ( test.reference, test.result);
|
||||
}
|
||||
|
||||
TEST_F( TEST_CATEGORY, vector_combination) {
|
||||
test_vector_combinations<int,TEST_EXECSPACE>(10);
|
||||
test_vector_combinations<int,TEST_EXECSPACE>(3057);
|
||||
}
|
||||
|
||||
} // namespace Test
|
||||
|
||||
|
||||
@ -210,4 +210,7 @@ struct TestViewCtorProp_EmbeddedDim {
|
||||
|
||||
} // namespace
|
||||
|
||||
TEST_F( TEST_CATEGORY, viewctorprop_embedded_dim ) {
|
||||
TestViewCtorProp_EmbeddedDim< TEST_EXECSPACE >::test_vcpt( 2, 3 );
|
||||
}
|
||||
} // namespace Test
|
||||
|
||||
@ -43,5 +43,5 @@
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestMDRange.hpp>
|
||||
#include<TestBitset.hpp>
|
||||
|
||||
65
lib/kokkos/containers/unit_tests/cuda/TestCuda_Category.hpp
Normal file
65
lib/kokkos/containers/unit_tests/cuda/TestCuda_Category.hpp
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#ifndef KOKKOS_TEST_CUDA_HPP
|
||||
#define KOKKOS_TEST_CUDA_HPP
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace Test {
|
||||
|
||||
class cuda : public ::testing::Test {
|
||||
protected:
|
||||
static void SetUpTestCase() {
|
||||
}
|
||||
|
||||
static void TearDownTestCase() {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Test
|
||||
|
||||
#define TEST_CATEGORY cuda
|
||||
#define TEST_EXECSPACE Kokkos::Cuda
|
||||
|
||||
#endif
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
@ -42,5 +43,5 @@
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestAtomicOperations.hpp>
|
||||
#include<TestDualView.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestDynViewAPI_generic.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestDynViewAPI_rank12345.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestDynViewAPI_rank67.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestDynamicView.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestErrorReporter.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestScatterView.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestStaticCrsGraph.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestUnorderedMap.hpp>
|
||||
|
||||
47
lib/kokkos/containers/unit_tests/cuda/TestCuda_Vector.cpp
Normal file
47
lib/kokkos/containers/unit_tests/cuda/TestCuda_Vector.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestVector.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<cuda/TestCuda_Category.hpp>
|
||||
#include<TestViewCtorPropEmbeddedDim.hpp>
|
||||
|
||||
@ -43,5 +43,5 @@
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestMDRange.hpp>
|
||||
#include<TestBitset.hpp>
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#ifndef KOKKOS_TEST_OPENMP_HPP
|
||||
#define KOKKOS_TEST_OPENMP_HPP
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace Test {
|
||||
|
||||
class openmp : public ::testing::Test {
|
||||
protected:
|
||||
static void SetUpTestCase() {
|
||||
}
|
||||
|
||||
static void TearDownTestCase() {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Test
|
||||
|
||||
#define TEST_CATEGORY openmp
|
||||
#define TEST_EXECSPACE Kokkos::OpenMP
|
||||
|
||||
#endif
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
@ -42,5 +43,5 @@
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestAtomicOperations.hpp>
|
||||
#include<TestDualView.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestDynViewAPI_generic.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestDynViewAPI_rank12345.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestDynViewAPI_rank67.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestDynamicView.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestErrorReporter.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestScatterView.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestStaticCrsGraph.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestUnorderedMap.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestVector.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<openmp/TestOpenMP_Category.hpp>
|
||||
#include<TestViewCtorPropEmbeddedDim.hpp>
|
||||
|
||||
@ -43,5 +43,5 @@
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestMDRange.hpp>
|
||||
#include<TestBitset.hpp>
|
||||
|
||||
65
lib/kokkos/containers/unit_tests/rocm/TestROCm_Category.hpp
Normal file
65
lib/kokkos/containers/unit_tests/rocm/TestROCm_Category.hpp
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#ifndef KOKKOS_TEST_ROCM_HPP
|
||||
#define KOKKOS_TEST_ROCM_HPP
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace Test {
|
||||
|
||||
class rocm : public ::testing::Test {
|
||||
protected:
|
||||
static void SetUpTestCase() {
|
||||
}
|
||||
|
||||
static void TearDownTestCase() {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Test
|
||||
|
||||
#define TEST_CATEGORY rocm
|
||||
#define TEST_EXECSPACE Kokkos::ROCm
|
||||
|
||||
#endif
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
@ -42,5 +43,5 @@
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestAtomicOperations.hpp>
|
||||
#include<TestDualView.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestDynViewAPI_generic.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestDynViewAPI_rank12345.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestDynViewAPI_rank67.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestDynamicView.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestErrorReporter.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestScatterView.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestStaticCrsGraph.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestUnorderedMap.hpp>
|
||||
|
||||
47
lib/kokkos/containers/unit_tests/rocm/TestROCm_Vector.cpp
Normal file
47
lib/kokkos/containers/unit_tests/rocm/TestROCm_Vector.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestVector.hpp>
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
|
||||
/*
|
||||
//@HEADER
|
||||
// ************************************************************************
|
||||
//
|
||||
// Kokkos v. 2.0
|
||||
// Copyright (2014) Sandia Corporation
|
||||
//
|
||||
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
||||
// the U.S. Government retains certain rights in this software.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the Corporation nor the names of the
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Questions? Contact Christian R. Trott (crtrott@sandia.gov)
|
||||
//
|
||||
// ************************************************************************
|
||||
//@HEADER
|
||||
*/
|
||||
|
||||
#include<rocm/TestROCm_Category.hpp>
|
||||
#include<TestViewCtorPropEmbeddedDim.hpp>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user