Ocean
platform/meta/quest/Utilities.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_PLATFORM_META_QUEST_UTILITIES_H
9 #define META_OCEAN_PLATFORM_META_QUEST_UTILITIES_H
10 
12 
13 namespace Ocean
14 {
15 
16 namespace Platform
17 {
18 
19 namespace Meta
20 {
21 
22 namespace Quest
23 {
24 
25 /**
26  * This class implements utility functions for Meta Quest platforms.
27  * @ingroup platformmetaquest
28  */
29 class Utilities
30 {
31  public:
32 
33  /**
34  * Restricts the execution of the current thread to Silver Cores only - on Quest.
35  * This functionality needs a special OS which allows to set the thread affinity to Silver cores, by default this is not possible.<br>
36  * Beware: Ensure that this function returns True, otherwise the current thread is not restricted to Silver cores.<br>
37  * Currently, this function is configured for Quest (with Silver cores 0-3, and Gold cores 4-7).<br>
38  * For a more customized behavior, you can set a custom CPU affinity via Platform::Android::Processor::setCurrentThreadAffinity().
39  * @return True, if succeeded
40  * @see restrictThreadExecutionToGoldCoresQuest().
41  */
43 
44  /**
45  * Restricts the execution of the current thread to Gold Cores only - on Quest.
46  * Beware: Ensure that this function returns True, otherwise the current thread is not restricted to Gold cores.<br>
47  * Currently, this function is configured for Quest (with Silver cores 0-3, and Gold cores 4-7).<br>
48  * @return True, if succeeded
49  * @see restrictThreadExecutionToSilverCoresQuest().
50  */
52 };
53 
54 }
55 
56 }
57 
58 }
59 
60 }
61 
62 #endif // META_OCEAN_PLATFORM_META_QUEST_UTILITIES_H
This class implements utility functions for Meta Quest platforms.
Definition: platform/meta/quest/Utilities.h:30
static bool restrictThreadExecutionToGoldCoresQuest()
Restricts the execution of the current thread to Gold Cores only - on Quest.
static bool restrictThreadExecutionToSilverCoresQuest()
Restricts the execution of the current thread to Silver Cores only - on Quest.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15