MostlyHarmless
0.0.1
Loading...
Searching...
No Matches
mostlyharmless_NoDenormals.h
Go to the documentation of this file.
1
//
2
// Created by Syl Morrison on 21/03/2025.
3
//
4
5
#ifndef MOSTLYHARMLESS_NODENORMALS_H
6
#define MOSTLYHARMLESS_NODENORMALS_H
7
#include <memory>
8
#include <cstdint>
9
namespace
mostly_harmless::utils
{
10
#ifndef MH_SSE_AVAILABLE
11
#if defined(__SSE__) || defined(_M_X64) || defined(_M_AMD64)
12
#define MH_SSE_AVAILABLE true
13
#else
14
#define MH_SSE_AVAILABLE false
15
#endif
16
#endif
22
class
NoDenormals
final {
23
public
:
27
NoDenormals
();
28
32
~NoDenormals
() noexcept;
33
34
private:
35
using FlagType = std::conditional_t<
MH_SSE_AVAILABLE
,
unsigned
int
, std::uintptr_t>;
36
FlagType m_controlFlag;
37
};
38
}
// namespace mostly_harmless::utils
39
#endif
// MOSTLYHARMLESS_NODENORMALS_H
mostly_harmless::utils::NoDenormals::NoDenormals
NoDenormals()
mostly_harmless::utils::NoDenormals::~NoDenormals
~NoDenormals() noexcept
MH_SSE_AVAILABLE
#define MH_SSE_AVAILABLE
Definition
mostlyharmless_NoDenormals.h:14
mostly_harmless::utils
Contains general purpose utility classes & functions.
Definition
mostlyharmless_TaskThread.h:12
include
mostly_harmless
utils
mostlyharmless_NoDenormals.h
Generated by
1.13.2