Skip to content

Commit

Permalink
[pnnl#197] Fixed a compilation problem when targeting CPP_SIMPLE
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoCastellana committed May 6, 2021
1 parent 4d5471a commit 0e52c37
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef INCLUDE_SHAD_RUNTIME_MAPPINGS_CPP_SIMPLE_CPP_SIMPLE_SYNCHRONOUS_INTERFACE_H_
#define INCLUDE_SHAD_RUNTIME_MAPPINGS_CPP_SIMPLE_CPP_SIMPLE_SYNCHRONOUS_INTERFACE_H_

#include <cstring>
#include <memory>
#include <utility>

Expand Down Expand Up @@ -156,14 +157,14 @@ struct SynchronousInterface<cpp_tag> {
template <typename T>
static void dma(const Locality &, const T* remoteAddress,
const T* localData, const size_t numElements) {
memcpy(getNodeId((u_int8_t*)remoteAddress,
(u_int8_t*)(localData), numElements*sizeof(T));
memcpy((u_int8_t*)remoteAddress, (u_int8_t*)localData,
numElements*sizeof(T));
}

template <typename T>
static void dma(const T* localAddress, const Locality &,
const T* remoteData, const size_t numElements) {
memcpy((u_int8_t*)localAddress, (u_int8_t*)(remoteData),
memcpy((u_int8_t*)localAddress, (u_int8_t*)remoteData,
numElements*sizeof(T));
}
};
Expand Down

0 comments on commit 0e52c37

Please sign in to comment.