#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_libc_calls
#endif
#ifndef MEDIA_GPU_MACROS_H_
#define MEDIA_GPU_MACROS_H_
#include <array>
#include "base/containers/auto_spanification_helper.h"
#include "base/logging.h"
#define DVLOGF(level) DVLOG(level) << __func__ << "(): "
#define DVLOGF_IF(level, condition) \
DVLOG_IF(level, condition) << __func__ << "(): "
#define VLOGF(level) VLOG(level) << __func__ << "(): "
#define VPLOGF(level) VPLOG(level) << __func__ << "(): "
#define LOGF(severity) LOG(severity) << __func__ << "(): "
#define DLOGF(severity) DLOG(severity) << __func__ << "(): "
#define DLOGF_IF(severity, condition) \
DLOG_IF(severity, condition) << __func__ << "(): "
namespace media {
template <typename T, size_t N>
inline void SafeArrayMemcpy(T (&to)[N], const T (&from)[N]) {
memcpy(to, from, sizeof(T[N]));
}
template <typename T, size_t N>
inline void SafeArrayMemcpy(T (&to)[N], const std::array<T, N>& from) {
memcpy(to, from.data(), sizeof(T[N]));
}
template <typename T, size_t N, size_t M>
inline void SafeArrayMemcpy(T (&to)[N][M],
const std::array<std::array<T, M>, N>& from) {
memcpy(to, from.data(), sizeof(T[N][M]));
}
}
#endif