v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
fpu.h
Go to the documentation of this file.
1// Copyright 2025 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_BASE_FPU_H_
6#define V8_BASE_FPU_H_
7
9
10namespace v8::base {
11class FPU final {
12 public:
14 V8_BASE_EXPORT static void SetFlushDenormals(bool);
15};
17 public:
18 explicit FlushDenormalsScope(bool value)
19 : old_flush_state_(FPU::GetFlushDenormals()) {
20 FPU::SetFlushDenormals(value);
21 }
22 ~FlushDenormalsScope() { FPU::SetFlushDenormals(old_flush_state_); }
23
24 private:
26};
27} // namespace v8::base
28
29#endif // V8_BASE_FPU_H_
#define V8_BASE_EXPORT
Definition base-export.h:26
static V8_BASE_EXPORT bool GetFlushDenormals()
Definition fpu.cc:96
static V8_BASE_EXPORT void SetFlushDenormals(bool)
Definition fpu.cc:97
FlushDenormalsScope(bool value)
Definition fpu.h:18