[Kokkos] Rename files to match Kokkos case conventions

This commit is contained in:
Tom Deakin 2018-02-14 22:05:50 +00:00
parent 4e2450e6ac
commit b93ac5d7cf
5 changed files with 22 additions and 20 deletions

View File

@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file.
### Changed ### Changed
- Update SYCL implementation to SYCL 1.2.1 interface. - Update SYCL implementation to SYCL 1.2.1 interface.
- Output formatting of Kokkos implementation.
- Capitalisation of Kokkos filenames.
### Removed ### Removed
- Superfluous OpenMP 4.5 map(to:) clauses on kernel target regions. - Superfluous OpenMP 4.5 map(to:) clauses on kernel target regions.

View File

@ -36,7 +36,7 @@ CXX = $(NVCC_WRAPPER)
TARGET_DEF = TARGET_DEF =
endif endif
OBJ = main.o KOKKOSStream.o OBJ = main.o KokkosStream.o
kokkos-stream: $(OBJ) $(KOKKOS_CPP_DEPENDS) kokkos-stream: $(OBJ) $(KOKKOS_CPP_DEPENDS)
$(CXX) $(KOKKOS_LDFLAGS) $(KOKKOS_LIBS) -DKOKKOS $(TARGET_DEF) -O3 $(EXTRA_FLAGS) $(OBJ) -o $@ $(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 .PHONY: clean
clean: clean:
rm -f kokkos-stream main.o KOKKOSStream.o rm -f kokkos-stream main.o KokkosStream.o

View File

@ -5,10 +5,10 @@
// source code // source code
#include "KOKKOSStream.hpp" #include "KokkosStream.hpp"
template <class T> template <class T>
KOKKOSStream<T>::KOKKOSStream( KokkosStream<T>::KokkosStream(
const unsigned int ARRAY_SIZE, const int device_index) const unsigned int ARRAY_SIZE, const int device_index)
: array_size(ARRAY_SIZE) : array_size(ARRAY_SIZE)
{ {
@ -26,13 +26,13 @@ KOKKOSStream<T>::KOKKOSStream(
} }
template <class T> template <class T>
KOKKOSStream<T>::~KOKKOSStream() KokkosStream<T>::~KokkosStream()
{ {
Kokkos::finalize(); Kokkos::finalize();
} }
template <class T> 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> a(*d_a);
Kokkos::View<double*, DEVICE> b(*d_b); 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> 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) std::vector<T>& a, std::vector<T>& b, std::vector<T>& c)
{ {
deep_copy(*hm_a, *d_a); deep_copy(*hm_a, *d_a);
@ -62,7 +62,7 @@ void KOKKOSStream<T>::read_arrays(
} }
template <class T> template <class T>
void KOKKOSStream<T>::copy() void KokkosStream<T>::copy()
{ {
Kokkos::View<double*, DEVICE> a(*d_a); Kokkos::View<double*, DEVICE> a(*d_a);
Kokkos::View<double*, DEVICE> b(*d_b); Kokkos::View<double*, DEVICE> b(*d_b);
@ -76,7 +76,7 @@ void KOKKOSStream<T>::copy()
} }
template <class T> template <class T>
void KOKKOSStream<T>::mul() void KokkosStream<T>::mul()
{ {
Kokkos::View<double*, DEVICE> a(*d_a); Kokkos::View<double*, DEVICE> a(*d_a);
Kokkos::View<double*, DEVICE> b(*d_b); Kokkos::View<double*, DEVICE> b(*d_b);
@ -91,7 +91,7 @@ void KOKKOSStream<T>::mul()
} }
template <class T> template <class T>
void KOKKOSStream<T>::add() void KokkosStream<T>::add()
{ {
Kokkos::View<double*, DEVICE> a(*d_a); Kokkos::View<double*, DEVICE> a(*d_a);
Kokkos::View<double*, DEVICE> b(*d_b); Kokkos::View<double*, DEVICE> b(*d_b);
@ -105,7 +105,7 @@ void KOKKOSStream<T>::add()
} }
template <class T> template <class T>
void KOKKOSStream<T>::triad() void KokkosStream<T>::triad()
{ {
Kokkos::View<double*, DEVICE> a(*d_a); Kokkos::View<double*, DEVICE> a(*d_a);
Kokkos::View<double*, DEVICE> b(*d_b); Kokkos::View<double*, DEVICE> b(*d_b);
@ -120,7 +120,7 @@ void KOKKOSStream<T>::triad()
} }
template <class T> template <class T>
T KOKKOSStream<T>::dot() T KokkosStream<T>::dot()
{ {
Kokkos::View<double *, DEVICE> a(*d_a); Kokkos::View<double *, DEVICE> a(*d_a);
Kokkos::View<double *, DEVICE> b(*d_b); Kokkos::View<double *, DEVICE> b(*d_b);
@ -153,5 +153,5 @@ std::string getDeviceDriver(const int device)
return "Kokkos"; return "Kokkos";
} }
//template class KOKKOSStream<float>; //template class KokkosStream<float>;
template class KOKKOSStream<double>; template class KokkosStream<double>;

View File

@ -24,7 +24,7 @@
#endif #endif
template <class T> template <class T>
class KOKKOSStream : public Stream<T> class KokkosStream : public Stream<T>
{ {
protected: protected:
// Size of arrays // Size of arrays
@ -40,8 +40,8 @@ class KOKKOSStream : public Stream<T>
public: public:
KOKKOSStream(const unsigned int, const int); KokkosStream(const unsigned int, const int);
~KOKKOSStream(); ~KokkosStream();
virtual void copy() override; virtual void copy() override;
virtual void add() override; virtual void add() override;

View File

@ -30,7 +30,7 @@
#elif defined(USE_RAJA) #elif defined(USE_RAJA)
#include "RAJAStream.hpp" #include "RAJAStream.hpp"
#elif defined(KOKKOS) #elif defined(KOKKOS)
#include "KOKKOSStream.hpp" #include "KokkosStream.hpp"
#elif defined(ACC) #elif defined(ACC)
#include "ACCStream.h" #include "ACCStream.h"
#elif defined(SYCL) #elif defined(SYCL)
@ -152,7 +152,7 @@ void run()
#elif defined(KOKKOS) #elif defined(KOKKOS)
// Use the Kokkos implementation // Use the Kokkos implementation
stream = new KOKKOSStream<T>(ARRAY_SIZE, deviceIndex); stream = new KokkosStream<T>(ARRAY_SIZE, deviceIndex);
#elif defined(ACC) #elif defined(ACC)
// Use the OpenACC implementation // Use the OpenACC implementation
@ -332,7 +332,7 @@ void run_triad()
#elif defined(KOKKOS) #elif defined(KOKKOS)
// Use the Kokkos implementation // Use the Kokkos implementation
stream = new KOKKOSStream<T>(ARRAY_SIZE, deviceIndex); stream = new KokkosStream<T>(ARRAY_SIZE, deviceIndex);
#elif defined(ACC) #elif defined(ACC)
// Use the OpenACC implementation // Use the OpenACC implementation