Skip to content

Commit

Permalink
version 3.21.12
Browse files Browse the repository at this point in the history
  • Loading branch information
jhopkins-ea committed Jun 9, 2023
1 parent e757b44 commit c6141b9
Show file tree
Hide file tree
Showing 98 changed files with 3,870 additions and 2,640 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ include(CommonCppFlags)
# Library definition
#-------------------------------------------------------------------------------------------
file(GLOB EASTL_SOURCES "source/*.cpp")
add_library(EASTL ${EASTL_SOURCES})
file(GLOB_RECURSE EASTL_HEADERS "include/EASTL/**.h")
add_library(EASTL ${EASTL_SOURCES} ${EASTL_HEADERS})

# include both source and headers in the files tab in Visual Studio
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${EASTL_HEADERS})

if (MSVC)
set(EASTL_NATVIS_DIR "doc")
Expand Down
11 changes: 8 additions & 3 deletions benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ endif()
#-------------------------------------------------------------------------------------------
# Source files
#-------------------------------------------------------------------------------------------
file(GLOB EASTLBENCHMARK_SOURCES "source/*.cpp" "../test/source/EASTLTestAllocator.cpp" "../test/source/EASTLTest.cpp")
set(SOURCES ${EASTLBENCHMARK_SOURCES})
file(GLOB EASTLBENCHMARK_SOURCES "source/*.cpp")
file(GLOB EASTLTEST_SOURCES "../test/source/EASTLTestAllocator.cpp" "../test/source/EASTLTest.cpp")
file(GLOB EASTLBENCHMARK_HEADERS "source/*.h")
set(SOURCES ${EASTLBENCHMARK_SOURCES} ${EASTLTEST_SOURCES} ${EASTLBENCHMARK_HEADERS})

# include both source and headers in the files view in Visual Studio
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${EASTLBENCHMARK_HEADERS})

#-------------------------------------------------------------------------------------------
# Defines
Expand All @@ -73,7 +78,7 @@ endif()
#-------------------------------------------------------------------------------------------
# Executable definition
#-------------------------------------------------------------------------------------------
add_executable(EASTLBenchmarks ${EASTLBENCHMARK_SOURCES})
add_executable(EASTLBenchmarks ${SOURCES})

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
Expand Down
7 changes: 7 additions & 0 deletions benchmark/source/BenchmarkAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ namespace std__

namespace
{
// Exists for the purpose testing PODs that are larger than built-in types.
template <size_t kSize>
struct SizedPOD
{
char memory[kSize];
};

void TestFindEndStd(EA::StdC::Stopwatch& stopwatch, const std::string& sTest, const char* pSearchStringBegin, const char* pSearchStringEnd)
{
stopwatch.Restart();
Expand Down
42 changes: 36 additions & 6 deletions doc/EASTL.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
<Type Name="eastl::ListIterator&lt;*&gt;">
<DisplayString>{*mpNode}</DisplayString>
<Expand>
<ExpandedItem>mpNode</ExpandedItem>
<ExpandedItem>*(eastl::ListNode&lt;$T1&gt;*)mpNode</ExpandedItem>
</Expand>
</Type>

Expand Down Expand Up @@ -299,7 +299,7 @@
<Type Name="eastl::SListIterator&lt;*&gt;">
<DisplayString>{*mpNode}</DisplayString>
<Expand>
<ExpandedItem>*mpNode</ExpandedItem>
<ExpandedItem>*(eastl::SListNode&lt;$T1&gt;*)mpNode</ExpandedItem>
</Expand>
</Type>

Expand All @@ -320,9 +320,9 @@
</Type>

<Type Name="eastl::intrusive_list_iterator&lt;*&gt;">
<DisplayString>{*mpNode}</DisplayString>
<DisplayString>{*($T1*)mpNode}</DisplayString>
<Expand>
<ExpandedItem>*mpNode</ExpandedItem>
<ExpandedItem>*($T1*)mpNode</ExpandedItem>
</Expand>
</Type>

Expand Down Expand Up @@ -399,9 +399,9 @@
</Type>

<Type Name="eastl::rbtree_iterator&lt;*&gt;">
<DisplayString>{*mpNode}</DisplayString>
<DisplayString>{*(eastl::rbtree_node&lt;$T1&gt;*)mpNode}</DisplayString>
<Expand>
<ExpandedItem>mpNode</ExpandedItem>
<Item Name="Node">*(eastl::rbtree_node&lt;$T1&gt;*)mpNode</Item>
</Expand>
</Type>

Expand Down Expand Up @@ -432,6 +432,30 @@
</Expand>
</Type>

<!-- specifically for hash_map (instead of base implementation hashtable),
show the key as name, and value as value, instead of index -> pair<key, value> -->
<Type Name="eastl::hash_map&lt;*&gt;">
<DisplayString Condition="mnElementCount == 0">[{mnElementCount}] {{}}</DisplayString>
<DisplayString Condition="mnElementCount != 0">[{mnElementCount}] {{ ... }}</DisplayString>
<Expand>
<CustomListItems ExcludeView="detailed">
<Variable Name="bucketIndex" InitialValue="0"/>
<Variable Name="entry" InitialValue ="mpBucketArray[bucketIndex]"/>
<Loop>
<Item Name="[{entry->mValue.first}]" Condition="entry != nullptr">entry->mValue.second</Item>
<If Condition="entry != nullptr">
<Exec>entry = entry->mpNext</Exec>
</If>
<If Condition="entry == nullptr">
<Exec>bucketIndex++</Exec>
<Break Condition="bucketIndex == mnBucketCount"/>
<Exec>entry = mpBucketArray[bucketIndex]</Exec>
</If>
</Loop>
</CustomListItems>
</Expand>
</Type>

<Type Name="eastl::hash_node&lt;*&gt;">
<DisplayString Condition="this != 0 &amp;&amp; mpNext != 0"> {mValue}, {*mpNext}</DisplayString>
<DisplayString Condition="this != 0 &amp;&amp; mpNext == 0"> {mValue}</DisplayString>
Expand Down Expand Up @@ -568,6 +592,12 @@
</Type>


<Type Name="eastl::atomic&lt;*&gt;">
<DisplayString>{mAtomic}</DisplayString>
<Expand>
<ExpandedItem>mAtomic</ExpandedItem>
</Expand>
</Type>

<Type Name="eastl::atomic_flag">
<DisplayString>{mFlag.mAtomic}</DisplayString>
Expand Down

0 comments on commit c6141b9

Please sign in to comment.