Update Kokkos library in LAMMPS to v4.4.0
This commit is contained in:
@ -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.
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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[]) {
|
||||
|
||||
Reference in New Issue
Block a user