
.. _program_listing_file_Src_GraphicsEngineVulkan_common_Utilities.hpp:

Program Listing for File Utilities.hpp
======================================

|exhale_lsh| :ref:`Return to documentation for file <file_Src_GraphicsEngineVulkan_common_Utilities.hpp>` (``Src/GraphicsEngineVulkan/common/Utilities.hpp``)

.. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS

.. code-block:: cpp

   #pragma once
   
   #include <stdexcept>
   
   #include "hostDevice/host_device_shared_vars.hpp"
   #include <spdlog/spdlog.h>
   
   namespace Kataglyphis {
   // Error checking on vulkan function calls - C++ API throws exceptions by default
   // This macro is kept for compatibility but generally not needed with C++ API
   #define ASSERT_VULKAN(val, error_string) \
       if (static_cast<vk::Result>(val) != vk::Result::eSuccess) { spdlog::error(error_string); }
   
   #define NOT_YET_IMPLEMENTED spdlog::error("Not yet implemented!");
   
   #ifdef NDEBUG
   const bool ENABLE_VALIDATION_LAYERS = false;
   #else
   const bool ENABLE_VALIDATION_LAYERS = true;
   #endif
   }// namespace Kataglyphis
