UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UnixPlatformMath.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2// IWYU pragma: begin_exports
3
4/*=============================================================================================
5 LinuxPlatformMath.h: Linux platform Math functions
6==============================================================================================*/
7
8#pragma once
9
10#include "CoreTypes.h"
14
18struct FLinuxPlatformMath : public TUnrealPlatformMathSSE4Base<FClangPlatformMath>
19{
20#if PLATFORM_ENABLE_VECTORINTRINSICS
21 static UE_FORCEINLINE_HINT bool IsNaN( float A ) { return isnan(A) != 0; }
22 static UE_FORCEINLINE_HINT bool IsNaN( double A ) { return isnan(A) != 0; }
23 static UE_FORCEINLINE_HINT bool IsFinite( float A ) { return isfinite(A); }
24 static UE_FORCEINLINE_HINT bool IsFinite( double A ) { return isfinite(A); }
25
26#if PLATFORM_ENABLE_POPCNT_INTRINSIC
30 static UE_FORCEINLINE_HINT int32 CountBits(uint64 Bits)
31 {
32 return __builtin_popcountll(Bits);
33 }
34#endif
35#endif
36};
37
39
40// IWYU pragma: end_exports
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define UE_FORCEINLINE_HINT
Definition Platform.h:723
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FLinuxPlatformMath FPlatformMath
Definition UnixPlatformMath.h:38
Definition UnixPlatformMath.h:19
Definition UnrealPlatformMathSSE4.h:70