UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MacPlatformMath.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
/*=============================================================================================
4
MacPlatformMath.h: Mac platform Math functions
5
==============================================================================================*/
6
7
#pragma once
8
#include "
Clang/ClangPlatformMath.h
"
9
#include "
Mac/MacSystemIncludes.h
"
10
11
12
#if PLATFORM_MAC_X86
13
#include <smmintrin.h>
14
#include "
Math/UnrealPlatformMathSSE4.h
"
15
16
/*
17
* Mac implementation of the Math OS functions
18
**/
19
struct
FMacPlatformMath
:
public
TUnrealPlatformMathSSE4Base
<FClangPlatformMath>
20
{
21
#if PLATFORM_ENABLE_POPCNT_INTRINSIC
25
static
UE_FORCEINLINE_HINT
int32
CountBits(
uint64
Bits)
26
{
27
return
__builtin_popcountll
(Bits);
28
}
29
#endif
30
31
static
UE_FORCEINLINE_HINT
bool
IsNaN(
float
A
) {
return
isnan
(
A
) != 0; }
32
static
UE_FORCEINLINE_HINT
bool
IsNaN(
double
A
) {
return
isnan
(
A
) != 0; }
33
static
UE_FORCEINLINE_HINT
bool
IsFinite
(
float
A
) {
return
isfinite
(
A
); }
34
static
UE_FORCEINLINE_HINT
bool
IsFinite
(
double
A
) {
return
isfinite
(
A
); }
35
};
36
37
typedef
FMacPlatformMath
FPlatformMath
;
38
#else
39
typedef
FClangPlatformMath
FPlatformMath
;
40
#endif
41
EMusicalNoteName::A
@ A
ClangPlatformMath.h
int32
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition
Platform.h:1125
UE_FORCEINLINE_HINT
#define UE_FORCEINLINE_HINT
Definition
Platform.h:723
uint64
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition
Platform.h:1117
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
FPlatformMath
FClangPlatformMath FPlatformMath
Definition
MacPlatformMath.h:39
MacSystemIncludes.h
EMaterialExpressionOperatorKind::IsFinite
@ IsFinite
UnrealPlatformMathSSE4.h
TUnrealPlatformMathSSE4Base
Definition
UnrealPlatformMathSSE4.h:70
Engine
Source
Runtime
Core
Public
Mac
MacPlatformMath.h
Generated by
1.9.8