30 static_assert (
sizeof (
pointer_sized_int) ==
sizeof (
void*),
"Basic sanity test failed: please report!");
31 static_assert (
sizeof (
int8) == 1,
"Basic sanity test failed: please report!");
32 static_assert (
sizeof (
uint8) == 1,
"Basic sanity test failed: please report!");
33 static_assert (
sizeof (
int16) == 2,
"Basic sanity test failed: please report!");
34 static_assert (
sizeof (
uint16) == 2,
"Basic sanity test failed: please report!");
35 static_assert (
sizeof (
int32) == 4,
"Basic sanity test failed: please report!");
36 static_assert (
sizeof (
uint32) == 4,
"Basic sanity test failed: please report!");
37 static_assert (
sizeof (
int64) == 8,
"Basic sanity test failed: please report!");
38 static_assert (
sizeof (
uint64) == 8,
"Basic sanity test failed: please report!");
45#if JUCE_ANDROID && ! defined (JUCE_DISABLE_JUCE_VERSION_PRINTING)
46 #define JUCE_DISABLE_JUCE_VERSION_PRINTING 1
49#if JUCE_DEBUG && ! JUCE_DISABLE_JUCE_VERSION_PRINTING
71String getLegacyUniqueDeviceID();
95 arr.add (getLegacyUniqueDeviceID());
117 if (hasBitValueSet (flags,
provider.flag))
129 void initialise()
noexcept;
131 int numLogicalCPUs = 0, numPhysicalCPUs = 0;
133 bool hasMMX =
false, hasSSE =
false, hasSSE2 =
false, hasSSE3 =
false,
134 has3DNow =
false, hasFMA3 =
false, hasFMA4 =
false, hasSSSE3 =
false,
135 hasSSE41 =
false, hasSSE42 =
false, hasAVX =
false, hasAVX2 =
false,
136 hasAVX512F =
false, hasAVX512BW =
false, hasAVX512CD =
false,
137 hasAVX512DQ =
false, hasAVX512ER =
false, hasAVX512IFMA =
false,
138 hasAVX512PF =
false, hasAVX512VBMI =
false, hasAVX512VL =
false,
139 hasAVX512VPOPCNTDQ =
false,
181 #if JUCE_ANDROID || JUCE_MINGW || JUCE_WASM
193 symbol->MaxNameLen = 255;
196 for (
int i = 0; i <
frames; ++i)
237 globalCrashHandler (
ep);
241static void handleCrash (
int signum)
247int juce_siginterrupt (
int sig,
int flag);
253 globalCrashHandler = handler;
262 ::signal (
signals[i], handleCrash);
263 juce_siginterrupt (
signals[i], 1);
272 #if JUCE_MAC || JUCE_IOS
301 void runTest()
override
303 beginTest (
"getUniqueDeviceID returns usable data.");
Represents a local file or directory.
bool isDirectory() const
Checks whether the file is a directory that exists.
String getFileExtension() const
Returns the file's extension.
@ invokedExecutableFile
Returns the file that was invoked to launch this executable.
@ windowsSystemDirectory
On a Windows machine, returns the location of the Windows/System32 folder.
static File JUCE_CALLTYPE getSpecialLocation(const SpecialLocationType type)
Finds the location of a special type of file or directory, such as a home folder or documents folder.
File getParentDirectory() const
Returns the directory that contains this file or directory.
uint64 getFileIdentifier() const
Returns a unique identifier for the file, if one is available.
Very simple container class to hold a pointer to some data on the heap.
void calloc(SizeType newNumElements, const size_t elementSize=sizeof(ElementType))
Allocates a specified amount of memory and clears it.
static Array< MACAddress > getAllAddresses()
Returns a list of the MAC addresses of all the available network cards.
A special array for holding a list of strings.
void add(String stringToAdd)
Appends a string at the end of the array.
bool isEmpty() const noexcept
Returns true if the array is empty, false otherwise.
static String toHexString(IntegerType number)
Returns a string representing this numeric value in hexadecimal.
static bool hasAVX512CD() noexcept
Returns true if Intel AVX-512 Conflict Detection instructions are available.
static String getStackBacktrace()
Returns a backtrace of the current call-stack.
static bool hasMMX() noexcept
Returns true if Intel MMX instructions are available.
static void setApplicationCrashHandler(CrashHandlerFunction)
Sets up a global callback function that will be called if the application executes some kind of illeg...
static String getUniqueDeviceID()
This method returns a machine unique ID unaffected by storage or peripheral changes.
static int getNumPhysicalCpus() noexcept
Returns the number of physical CPU cores.
static bool hasAVX512ER() noexcept
Returns true if Intel AVX-512 Exponential and Reciprocal instructions are available.
static bool has3DNow() noexcept
Returns true if AMD 3DNOW instructions are available.
static bool hasAVX2() noexcept
Returns true if Intel AVX2 instructions are available.
static bool hasAVX512VPOPCNTDQ() noexcept
Returns true if Intel AVX-512 Vector Population Count Double and Quad-word instructions are available...
static bool hasSSE() noexcept
Returns true if Intel SSE instructions are available.
static bool hasAVX512DQ() noexcept
Returns true if Intel AVX-512 Doubleword and Quadword instructions are available.
static bool isRunningInAppExtensionSandbox() noexcept
Returns true if this code is running inside an app extension sandbox.
static bool hasNeon() noexcept
Returns true if ARM NEON instructions are available.
static bool hasAVX512F() noexcept
Returns true if Intel AVX-512 Foundation instructions are available.
static bool hasSSE3() noexcept
Returns true if Intel SSE3 instructions are available.
static bool hasSSE2() noexcept
Returns true if Intel SSE2 instructions are available.
static bool hasAVX() noexcept
Returns true if Intel AVX instructions are available.
void(*)(void *) CrashHandlerFunction
A function type for use in setApplicationCrashHandler().
static bool hasAVX512VBMI() noexcept
Returns true if Intel AVX-512 Vector Bit Manipulation instructions are available.
MachineIdFlags
Kinds of identifier that are passed to getMachineIdentifiers().
@ legacyUniqueId
Only implemented on Windows. A hash of the full smbios table, may be unstable on certain machines.
@ uniqueId
The most stable kind of machine identifier. A good default to use.
@ fileSystemId
The filesystem id of the user's home directory (or system directory on Windows).
@ macAddresses
All Mac addresses of the machine.
static bool hasSSSE3() noexcept
Returns true if Intel SSSE3 instructions are available.
static bool hasAVX512VL() noexcept
Returns true if Intel AVX-512 Vector Length instructions are available.
static bool hasAVX512PF() noexcept
Returns true if Intel AVX-512 Prefetch instructions are available.
static bool hasSSE41() noexcept
Returns true if Intel SSE4.1 instructions are available.
static StringArray getDeviceIdentifiers()
This method calculates some IDs to uniquely identify the device.
static bool hasFMA4() noexcept
Returns true if AMD FMA4 instructions are available.
static String getJUCEVersion()
Returns the current version of JUCE, See also the JUCE_VERSION, JUCE_MAJOR_VERSION and JUCE_MINOR_VER...
static bool hasSSE42() noexcept
Returns true if Intel SSE4.2 instructions are available.
static StringArray getMachineIdentifiers(MachineIdFlags flags)
Returns a list of strings that can be used to uniquely identify a machine.
static bool hasFMA3() noexcept
Returns true if AMD FMA3 instructions are available.
static bool hasAVX512IFMA() noexcept
Returns true if Intel AVX-512 Integer Fused Multiply-Add instructions are available.
static bool hasAVX512BW() noexcept
Returns true if Intel AVX-512 Byte and Word instructions are available.
static int getNumCpus() noexcept
Returns the number of logical CPU cores.
This is a base class for classes that perform a unit test.
#define JUCE_MAJOR_VERSION
Current JUCE version number.
void zerostruct(Type &structure) noexcept
Overwrites a structure or object with zeros.
unsigned short uint16
A platform-independent 16-bit unsigned integer type.
int pointer_sized_int
A signed integer type that's guaranteed to be large enough to hold a pointer without truncating it.
NewLine newLine
A predefined object representing a new-line, which can be written to a string or stream.
signed short int16
A platform-independent 16-bit signed integer type.
signed int int32
A platform-independent 32-bit signed integer type.
signed char int8
A platform-independent 8-bit signed integer type.
unsigned long long uint64
A platform-independent 64-bit unsigned integer type.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
unsigned int uint32
A platform-independent 32-bit unsigned integer type.
unsigned char uint8
A platform-independent 8-bit unsigned integer type.
constexpr int numElementsInArray(Type(&)[N]) noexcept
Handy function for getting the number of elements in a simple const C array.
long long int64
A platform-independent 64-bit integer type.