// Returning a reference is unfortunately incompatible with `std::atomic`, which // is required to safely implement `SetWarnFunc`. As a workaround, we store a // copy here, update it when called, and return a reference to the copy. This // has the added benefit of protecting the actual pointer from modification.
HWY_DLLEXPORT WarnFunc& GetWarnFunc() { static WarnFunc func;
func = AtomicWarnFunc().load(); return func;
}
// If compiled with any sanitizer, they can also print a stack trace. #if HWY_IS_ASAN || HWY_IS_MSAN || HWY_IS_TSAN
__sanitizer_print_stack_trace(); #endif// HWY_IS_*
fflush(stderr);
// Now terminate the program: #if HWY_ARCH_RISCV exit(1); // trap/abort just freeze Spike. #elif HWY_IS_DEBUG_BUILD && !HWY_COMPILER_MSVC && !HWY_ARCH_ARM // Facilitates breaking into a debugger, but don't use this in non-debug // builds because it looks like "illegal instruction", which is misleading. // Also does not work on Arm.
__builtin_trap(); #else
abort(); // Compile error without this due to HWY_NORETURN. #endif
}
} // namespace hwy
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.26 Sekunden
(vorverarbeitet am 2026-10-02)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.