godot/thirdparty/embree/common/sys/atomic.h

// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include <atomic>
#include "intrinsics.h"

namespace embree
{
/* compiler memory barriers */
#if defined(__INTEL_COMPILER)
//#define __memory_barrier() __memory_barrier()
#elif defined(__GNUC__) || defined(__clang__)
#define __memory_barrier()
#elif  defined(_MSC_VER)
#define __memory_barrier
#endif

  template <typename T>
    struct atomic : public std::atomic<T>
  {};

  template<typename T>
    __forceinline void _atomic_min(std::atomic<T>& aref, const T& bref)
  {}

  template<typename T>
    __forceinline void _atomic_max(std::atomic<T>& aref, const T& bref)
  {}
}