Skip to content
Snippets Groups Projects
Select Git revision
  • 3bdecb96c3d4324a2c121bd5519722629a07aba9
  • master default protected
  • refactoring
  • push_test
  • qpong_opengl
  • push_to_gitlab
  • feature_imgui_opengl
  • feature_google_test_integration
  • feature_config
  • merge_ci_and_googletest
  • feature_pixbuf
  • feature_heapBuffer
12 results

Common.hpp

Blame
  • Armin's avatar
    Armin Co authored
    3bdecb96
    History
    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