Skip to content

Commit

Permalink
Silence c++11-extensions warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
James Eggleton committed Apr 10, 2020
1 parent b07e75d commit feac737
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/occa/core/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ namespace occa {
const void *src = NULL,
const occa::properties &props = occa::properties());

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wc++11-extensions"

template <class TM = void>
occa::memory malloc(const dim_t entries,
const void *src = NULL,
Expand All @@ -85,6 +88,8 @@ namespace occa {
const void *src = NULL,
const occa::properties &props = occa::properties());

#pragma clang diagnostic pop

template <>
void* umalloc<void>(const dim_t entries,
const void *src,
Expand Down
6 changes: 6 additions & 0 deletions include/occa/core/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ namespace occa {
const dtype_t &dtype,
const occa::properties &props);

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wc++11-extensions"

template <class TM = void>
occa::memory malloc(const dim_t bytes,
const void *src = NULL,
Expand Down Expand Up @@ -287,6 +290,9 @@ namespace occa {
template <class TM = void>
TM* umalloc(const dim_t entries,
const occa::properties &props);

#pragma clang diagnostic pop

// |===============================
};

Expand Down
5 changes: 5 additions & 0 deletions include/occa/core/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ namespace occa {

memory& swap(memory &m);

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wc++11-extensions"

template <class TM = void>
TM* ptr();

Expand All @@ -149,6 +152,8 @@ namespace occa {
template <class TM = void>
const TM* ptr(const occa::properties &props) const;

#pragma clang diagnostic pop

modeMemory_t* getModeMemory() const;
modeDevice_t* getModeDevice() const;

Expand Down

0 comments on commit feac737

Please sign in to comment.