[Kokkos] Rename files to match Kokkos case conventions
This commit is contained in:
parent
4e2450e6ac
commit
b93ac5d7cf
@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
### Changed
|
||||
- Update SYCL implementation to SYCL 1.2.1 interface.
|
||||
- Output formatting of Kokkos implementation.
|
||||
- Capitalisation of Kokkos filenames.
|
||||
|
||||
### Removed
|
||||
- Superfluous OpenMP 4.5 map(to:) clauses on kernel target regions.
|
||||
|
||||
@ -36,7 +36,7 @@ CXX = $(NVCC_WRAPPER)
|
||||
TARGET_DEF =
|
||||
endif
|
||||
|
||||
OBJ = main.o KOKKOSStream.o
|
||||
OBJ = main.o KokkosStream.o
|
||||
|
||||
kokkos-stream: $(OBJ) $(KOKKOS_CPP_DEPENDS)
|
||||
$(CXX) $(KOKKOS_LDFLAGS) $(KOKKOS_LIBS) -DKOKKOS $(TARGET_DEF) -O3 $(EXTRA_FLAGS) $(OBJ) -o $@
|
||||
@ -46,5 +46,5 @@ kokkos-stream: $(OBJ) $(KOKKOS_CPP_DEPENDS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f kokkos-stream main.o KOKKOSStream.o
|
||||
rm -f kokkos-stream main.o KokkosStream.o
|
||||
|
||||
|
||||
@ -5,10 +5,10 @@
|
||||
// source code
|
||||
|
||||
|
||||
#include "KOKKOSStream.hpp"
|
||||
#include "KokkosStream.hpp"
|
||||
|
||||
template <class T>
|
||||
KOKKOSStream<T>::KOKKOSStream(
|
||||
KokkosStream<T>::KokkosStream(
|
||||
const unsigned int ARRAY_SIZE, const int device_index)
|
||||
: array_size(ARRAY_SIZE)
|
||||
{
|
||||
@ -26,13 +26,13 @@ KOKKOSStream<T>::KOKKOSStream(
|
||||
}
|
||||
|
||||
template <class T>
|
||||
KOKKOSStream<T>::~KOKKOSStream()
|
||||
KokkosStream<T>::~KokkosStream()
|
||||
{
|
||||
Kokkos::finalize();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void KOKKOSStream<T>::init_arrays(T initA, T initB, T initC)
|
||||
void KokkosStream<T>::init_arrays(T initA, T initB, T initC)
|
||||
{
|
||||
Kokkos::View<double*, DEVICE> a(*d_a);
|
||||
Kokkos::View<double*, DEVICE> b(*d_b);
|
||||
@ -47,7 +47,7 @@ void KOKKOSStream<T>::init_arrays(T initA, T initB, T initC)
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void KOKKOSStream<T>::read_arrays(
|
||||
void KokkosStream<T>::read_arrays(
|
||||
std::vector<T>& a, std::vector<T>& b, std::vector<T>& c)
|
||||
{
|
||||
deep_copy(*hm_a, *d_a);
|
||||
@ -62,7 +62,7 @@ void KOKKOSStream<T>::read_arrays(
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void KOKKOSStream<T>::copy()
|
||||
void KokkosStream<T>::copy()
|
||||
{
|
||||
Kokkos::View<double*, DEVICE> a(*d_a);
|
||||
Kokkos::View<double*, DEVICE> b(*d_b);
|
||||
@ -76,7 +76,7 @@ void KOKKOSStream<T>::copy()
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void KOKKOSStream<T>::mul()
|
||||
void KokkosStream<T>::mul()
|
||||
{
|
||||
Kokkos::View<double*, DEVICE> a(*d_a);
|
||||
Kokkos::View<double*, DEVICE> b(*d_b);
|
||||
@ -91,7 +91,7 @@ void KOKKOSStream<T>::mul()
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void KOKKOSStream<T>::add()
|
||||
void KokkosStream<T>::add()
|
||||
{
|
||||
Kokkos::View<double*, DEVICE> a(*d_a);
|
||||
Kokkos::View<double*, DEVICE> b(*d_b);
|
||||
@ -105,7 +105,7 @@ void KOKKOSStream<T>::add()
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void KOKKOSStream<T>::triad()
|
||||
void KokkosStream<T>::triad()
|
||||
{
|
||||
Kokkos::View<double*, DEVICE> a(*d_a);
|
||||
Kokkos::View<double*, DEVICE> b(*d_b);
|
||||
@ -120,7 +120,7 @@ void KOKKOSStream<T>::triad()
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T KOKKOSStream<T>::dot()
|
||||
T KokkosStream<T>::dot()
|
||||
{
|
||||
Kokkos::View<double *, DEVICE> a(*d_a);
|
||||
Kokkos::View<double *, DEVICE> b(*d_b);
|
||||
@ -153,5 +153,5 @@ std::string getDeviceDriver(const int device)
|
||||
return "Kokkos";
|
||||
}
|
||||
|
||||
//template class KOKKOSStream<float>;
|
||||
template class KOKKOSStream<double>;
|
||||
//template class KokkosStream<float>;
|
||||
template class KokkosStream<double>;
|
||||
@ -24,7 +24,7 @@
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
class KOKKOSStream : public Stream<T>
|
||||
class KokkosStream : public Stream<T>
|
||||
{
|
||||
protected:
|
||||
// Size of arrays
|
||||
@ -40,8 +40,8 @@ class KOKKOSStream : public Stream<T>
|
||||
|
||||
public:
|
||||
|
||||
KOKKOSStream(const unsigned int, const int);
|
||||
~KOKKOSStream();
|
||||
KokkosStream(const unsigned int, const int);
|
||||
~KokkosStream();
|
||||
|
||||
virtual void copy() override;
|
||||
virtual void add() override;
|
||||
6
main.cpp
6
main.cpp
@ -30,7 +30,7 @@
|
||||
#elif defined(USE_RAJA)
|
||||
#include "RAJAStream.hpp"
|
||||
#elif defined(KOKKOS)
|
||||
#include "KOKKOSStream.hpp"
|
||||
#include "KokkosStream.hpp"
|
||||
#elif defined(ACC)
|
||||
#include "ACCStream.h"
|
||||
#elif defined(SYCL)
|
||||
@ -152,7 +152,7 @@ void run()
|
||||
|
||||
#elif defined(KOKKOS)
|
||||
// Use the Kokkos implementation
|
||||
stream = new KOKKOSStream<T>(ARRAY_SIZE, deviceIndex);
|
||||
stream = new KokkosStream<T>(ARRAY_SIZE, deviceIndex);
|
||||
|
||||
#elif defined(ACC)
|
||||
// Use the OpenACC implementation
|
||||
@ -332,7 +332,7 @@ void run_triad()
|
||||
|
||||
#elif defined(KOKKOS)
|
||||
// Use the Kokkos implementation
|
||||
stream = new KOKKOSStream<T>(ARRAY_SIZE, deviceIndex);
|
||||
stream = new KokkosStream<T>(ARRAY_SIZE, deviceIndex);
|
||||
|
||||
#elif defined(ACC)
|
||||
// Use the OpenACC implementation
|
||||
|
||||
Loading…
Reference in New Issue
Block a user