SpECTRE Documentation Coverage Report
Current view: top level - Utilities - BlazeExceptions.hpp Hit Total Coverage
Commit: bcc6763cee2b3f1593fb35e61fb83412a3313e95 Lines: 0 2 0.0 %
Date: 2024-09-16 17:23:19
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <csignal>
       7             : 
       8             : #ifdef __CUDA_ARCH__
       9             : // When building for Nvidia GPUs we need to disable the use of vector
      10             : // intrinsics.
      11             : #define BLAZE_USE_VECTORIZATION 0
      12             : #endif
      13             : 
      14             : #ifdef SPECTRE_DEBUG
      15             : #define BLAZE_THROW(EXCEPTION)           \
      16             :   struct sigaction handler {};           \
      17             :   handler.sa_handler = SIG_IGN;          \
      18             :   handler.sa_flags = 0;                  \
      19             :   sigemptyset(&handler.sa_mask);         \
      20             :   sigaction(SIGTRAP, &handler, nullptr); \
      21             :   raise(SIGTRAP);                        \
      22             :   throw EXCEPTION
      23             : #else  // SPECTRE_DEBUG
      24           0 : #define BLAZE_THROW(EXCEPTION)
      25             : #endif  // SPECTRE_DEBUG

Generated by: LCOV version 1.14