Update Kokkos library in LAMMPS to v4.4.0

This commit is contained in:
Stan Moore
2024-09-11 09:20:36 -06:00
parent 16b19c71c1
commit a44955dd2e
254 changed files with 14227 additions and 9881 deletions

View File

@ -16,7 +16,6 @@
#include <Kokkos_Core.hpp>
#include <cstdio>
#include <typeinfo>
//
// "Hello world" parallel_for example:
@ -25,12 +24,12 @@
// using a functor to define the loop body
// 3. Shut down Kokkos
//
// If Kokkos was built with C++11 enabled, try comparing this example
// to 01_hello_world_lambda. The latter uses C++11 lambdas (anonymous
// functions) to define the loop body of the parallel_for. That makes
// the code much more concise and readable. On the other hand,
// breaking out the loop body into an explicit functor makes it easier
// to test the loop independently of the parallel pattern.
// Try comparing this example to 01_hello_world_lambda, which uses
// C++11 lambdas (anonymous functions) to define the loop body of the
// parallel_for. That makes the code much more concise and readable.
// On the other hand, breaking out the loop body into an explicit
// functor makes it easier to test the loop independently of the
// parallel pattern.
//
// Functor that defines the parallel_for's loop body.
@ -72,11 +71,9 @@ int main(int argc, char* argv[]) {
// start with "--kokkos-".
Kokkos::initialize(argc, argv);
// Print the name of Kokkos' default execution space. We're using
// typeid here, so the name might get a bit mangled by the linker,
// but you should still be able to figure out what it is.
// Print the name of Kokkos' default execution space.
printf("Hello World on Kokkos execution space %s\n",
typeid(Kokkos::DefaultExecutionSpace).name());
Kokkos::DefaultExecutionSpace::name());
// Run the above functor on the default Kokkos execution space in
// parallel, with a parallel for loop count of 15.

View File

@ -16,7 +16,6 @@
#include <Kokkos_Core.hpp>
#include <cstdio>
#include <typeinfo>
//
// "Hello world" parallel_for example:
@ -25,10 +24,9 @@
// using a C++11 lambda to define the loop body
// 3. Shut down Kokkos
//
// This example only builds if C++11 is enabled. Compare this example
// to 01_hello_world, which uses functors (explicitly defined classes)
// to define the loop body of the parallel_for. Both functors and
// lambdas have their places.
// Compare this example to 01_hello_world, which uses functors
// (explicitly defined classes) to define the loop body of the
// parallel_for. Both functors and lambdas have their places.
//
int main(int argc, char* argv[]) {
@ -41,11 +39,9 @@ int main(int argc, char* argv[]) {
// start with "--kokkos-".
Kokkos::initialize(argc, argv);
// Print the name of Kokkos' default execution space. We're using
// typeid here, so the name might get a bit mangled by the linker,
// but you should still be able to figure out what it is.
// Print the name of Kokkos' default execution space.
printf("Hello World on Kokkos execution space %s\n",
typeid(Kokkos::DefaultExecutionSpace).name());
Kokkos::DefaultExecutionSpace::name());
// Run lambda on the default Kokkos execution space in parallel,
// with a parallel for loop count of 15. The lambda's argument is

View File

@ -24,9 +24,8 @@
// using a C++11 lambda to define the loop body
// 3. Shut down Kokkos
//
// This example only builds if C++11 is enabled. Compare this example
// to 02_simple_reduce, which uses a functor to define the loop body
// of the parallel_reduce.
// Compare this example to 02_simple_reduce, which uses a functor to
// define the loop body of the parallel_reduce.
//
int main(int argc, char* argv[]) {