Select Git revision

Armin Co authored
Common.hpp 517 B
///
/// @file Common.hpp
/// @author Armin Co
///
#ifndef QPONG_COMMON_HPP
#define QPONG_COMMON_HPP
namespace QPong
{
constexpr int arrayWidth = 384 * 1;
constexpr int arrayHeight = 384 * 1;
constexpr int numberOfThreads = 8;
constexpr unsigned arraySize = arrayWidth * arrayHeight;
static_assert(arraySize % numberOfThreads == 0, "Number of threads and array size doesn't match!");
/// @brief Calc square of a number.
///
template <typename T>
const T sqr(const T n)
{
return n * n;
}
}
#endif