]> git.seodisparate.com/gitweb - EntityComponentMetaSystem/log
EntityComponentMetaSystem
15 months agoMerge branch 'master' into cxx17
Stephen Seo [Sat, 20 Jan 2024 10:45:14 +0000 (19:45 +0900)]
Merge branch 'master' into cxx17

15 months agoEnable tests on "any_archLinux" act runners
Stephen Seo [Sat, 20 Jan 2024 10:44:48 +0000 (19:44 +0900)]
Enable tests on "any_archLinux" act runners

15 months agoMerge branch 'master' into cxx17
Stephen Seo [Sat, 20 Jan 2024 10:21:39 +0000 (19:21 +0900)]
Merge branch 'master' into cxx17

15 months agoRevert "Enable another act runner for unit tests"
Stephen Seo [Sat, 20 Jan 2024 10:20:40 +0000 (19:20 +0900)]
Revert "Enable another act runner for unit tests"

This reverts commit 654ddac9430a6814dcf8c6a37943cc1efee8347c.

15 months agoMerge branch 'master' into cxx17
Stephen Seo [Sat, 20 Jan 2024 09:00:53 +0000 (18:00 +0900)]
Merge branch 'master' into cxx17

15 months agoEnable another act runner for unit tests
Stephen Seo [Sat, 20 Jan 2024 09:00:25 +0000 (18:00 +0900)]
Enable another act runner for unit tests

15 months agoMerge branch 'master' into cxx17
Stephen Seo [Fri, 19 Jan 2024 06:21:45 +0000 (15:21 +0900)]
Merge branch 'master' into cxx17

15 months agoAdd github action to run UnitTests
Stephen Seo [Wed, 17 Jan 2024 10:22:20 +0000 (19:22 +0900)]
Add github action to run UnitTests

15 months agoUpdate CMakeLists.txt cmake version
Stephen Seo [Wed, 17 Jan 2024 10:02:51 +0000 (19:02 +0900)]
Update CMakeLists.txt cmake version

15 months agoAdd forgejo action to run unit tests
Stephen Seo [Wed, 17 Jan 2024 09:57:29 +0000 (18:57 +0900)]
Add forgejo action to run unit tests

15 months agoUpdate README.md
Stephen Seo [Mon, 15 Jan 2024 04:56:49 +0000 (13:56 +0900)]
Update README.md

15 months agoAdd forgejo action to generate doxygen docs
Stephen Seo [Mon, 15 Jan 2024 04:55:34 +0000 (13:55 +0900)]
Add forgejo action to generate doxygen docs

2 years agoMerge branch 'master' into cxx17
Stephen Seo [Fri, 17 Jun 2022 02:02:36 +0000 (11:02 +0900)]
Merge branch 'master' into cxx17

2 years agoUpdate LICENSE year
Stephen Seo [Fri, 17 Jun 2022 02:02:24 +0000 (11:02 +0900)]
Update LICENSE year

2 years agoUse optional instead of unique_ptr in ThreadPool
Stephen Seo [Thu, 16 Jun 2022 05:09:26 +0000 (14:09 +0900)]
Use optional instead of unique_ptr in ThreadPool

2 years agoMerge branch 'master' into cxx17
Stephen Seo [Thu, 16 Jun 2022 05:01:26 +0000 (14:01 +0900)]
Merge branch 'master' into cxx17

2 years agoMerge branch 'nested_threads'
Stephen Seo [Thu, 16 Jun 2022 04:42:52 +0000 (13:42 +0900)]
Merge branch 'nested_threads'

2 years agoclang-format EC/ThreadPool.hpp
Stephen Seo [Thu, 16 Jun 2022 04:39:26 +0000 (13:39 +0900)]
clang-format EC/ThreadPool.hpp

2 years agoApply minor fix and documentation to ThreadPool
Stephen Seo [Thu, 16 Jun 2022 04:38:53 +0000 (13:38 +0900)]
Apply minor fix and documentation to ThreadPool

2 years agoReformat EC/Manager.hpp
Stephen Seo [Thu, 16 Jun 2022 04:27:43 +0000 (13:27 +0900)]
Reformat EC/Manager.hpp

2 years agoUndo change of temporary struct in Manager
Stephen Seo [Thu, 16 Jun 2022 04:26:06 +0000 (13:26 +0900)]
Undo change of temporary struct in Manager

2 years agoRemove zero-ing of atomic_uint in ThreadPool
Stephen Seo [Thu, 16 Jun 2022 03:41:08 +0000 (12:41 +0900)]
Remove zero-ing of atomic_uint in ThreadPool

Setting the current "stacks" atomic_uint to zero is unnecessary once all
the threads have finished execution.

2 years agoAdd atomic_bool to ThreadPool to ensure validity
Stephen Seo [Thu, 16 Jun 2022 03:37:09 +0000 (12:37 +0900)]
Add atomic_bool to ThreadPool to ensure validity

The new deque<atomic_bool> ensures that values are not dropped from the
deque until the entry's threads have finished execution.

2 years agoFix ThreadPool::easyStartAndWait()
Stephen Seo [Thu, 16 Jun 2022 03:20:02 +0000 (12:20 +0900)]
Fix ThreadPool::easyStartAndWait()

Previously, the "waiting" part wasn't implemented.

2 years agoImpl nested threaded calls
Stephen Seo [Wed, 15 Jun 2022 12:15:34 +0000 (21:15 +0900)]
Impl nested threaded calls

More testing is probably required to make sure it works properly.

2 years agoWIP nestable threads via ThreadPool
Stephen Seo [Wed, 15 Jun 2022 07:38:36 +0000 (16:38 +0900)]
WIP nestable threads via ThreadPool

Currently has a race-condition-like memory corruption bug where function
contexts are deleted before child-functions complete (probably).

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Thu, 20 Jan 2022 08:33:30 +0000 (17:33 +0900)]
Merge branch 'master' into cxx17

3 years agoImpl deferring deletions allowing for delete in fn
Stephen Seo [Thu, 20 Jan 2022 08:32:05 +0000 (17:32 +0900)]
Impl deferring deletions allowing for delete in fn

deleteEntity() is now allowed during a "forMatching" call, since it is deferred
until the "forMatching" call(s) end.

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Thu, 20 Jan 2022 05:34:31 +0000 (14:34 +0900)]
Merge branch 'master' into cxx17

3 years agoFix possible data-race with isAlive() calls
Stephen Seo [Thu, 20 Jan 2022 05:31:23 +0000 (14:31 +0900)]
Fix possible data-race with isAlive() calls

Removed isAlive() calls from functions passed to ThreadPool, and instead use an
unordered_set prior to using ThreadPool to "cache" which entities are not alive.
This is so that if a function passed to ThreadPool modifies the ECManager (e.g.
creating a new entity), then there will be no data race from also calling
isAlive(). (Note that this does not protect against "deleting" entities from the
ECManager during use of ThreadPool. It is expected for the caller to do the
"deleting" after use of stored/called functions is finished.)

3 years agoUse "if constexpr" where possible in ThreadPool
Stephen Seo [Thu, 9 Sep 2021 06:55:23 +0000 (15:55 +0900)]
Use "if constexpr" where possible in ThreadPool

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Thu, 9 Sep 2021 06:54:30 +0000 (15:54 +0900)]
Merge branch 'master' into cxx17

3 years agoAdd easyWakeAndWait() to ThreadPool
Stephen Seo [Thu, 9 Sep 2021 06:53:55 +0000 (15:53 +0900)]
Add easyWakeAndWait() to ThreadPool

Changed usage of ThreadPool in EC::Manager to use easyWakeAndWait().

3 years agoUpdate doxygen main page to link to EC::Manager
Stephen Seo [Thu, 9 Sep 2021 04:13:55 +0000 (13:13 +0900)]
Update doxygen main page to link to EC::Manager

3 years agoUpdate Doxygen and README.md
Stephen Seo [Wed, 8 Sep 2021 09:06:24 +0000 (18:06 +0900)]
Update Doxygen and README.md

3 years agoAttempt to use github actions for Doxygen docs
Stephen Seo [Wed, 8 Sep 2021 08:42:43 +0000 (17:42 +0900)]
Attempt to use github actions for Doxygen docs

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Wed, 8 Sep 2021 06:56:44 +0000 (15:56 +0900)]
Merge branch 'master' into cxx17

3 years agoDouble the number of tasks given to ThreadPool
Stephen Seo [Wed, 8 Sep 2021 06:55:08 +0000 (15:55 +0900)]
Double the number of tasks given to ThreadPool

Previous implementation only enqueued "ThreadCount" tasks to ThreadPool.
For more efficiency, this has been changed to "ThreadCount * 2" tasks.

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Wed, 8 Sep 2021 06:12:04 +0000 (15:12 +0900)]
Merge branch 'master' into cxx17

3 years agoUpdate README.md
Stephen Seo [Wed, 8 Sep 2021 06:08:49 +0000 (15:08 +0900)]
Update README.md

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Wed, 8 Sep 2021 05:58:54 +0000 (14:58 +0900)]
Merge branch 'master' into cxx17

3 years agoUpdate doxygen documentation
Stephen Seo [Wed, 8 Sep 2021 05:58:41 +0000 (14:58 +0900)]
Update doxygen documentation

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Wed, 8 Sep 2021 05:14:43 +0000 (14:14 +0900)]
Merge branch 'master' into cxx17

3 years agoRemove redundant function
Stephen Seo [Wed, 8 Sep 2021 05:14:14 +0000 (14:14 +0900)]
Remove redundant function

"deleteForMatchingFunction()" was exactly the same as
"removeForMatchingFunction()", so it was removed.

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Wed, 8 Sep 2021 01:49:49 +0000 (10:49 +0900)]
Merge branch 'master' into cxx17

3 years agoRename a UnitTest for ThreadPool
Stephen Seo [Wed, 8 Sep 2021 01:49:32 +0000 (10:49 +0900)]
Rename a UnitTest for ThreadPool

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Wed, 8 Sep 2021 01:46:39 +0000 (10:46 +0900)]
Merge branch 'master' into cxx17

3 years agoFix UnitTests for ThreadPool
Stephen Seo [Wed, 8 Sep 2021 01:46:26 +0000 (10:46 +0900)]
Fix UnitTests for ThreadPool

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Tue, 7 Sep 2021 11:25:10 +0000 (20:25 +0900)]
Merge branch 'master' into cxx17

3 years agoMake ThreadPool::getThreadCount() constexpr
Stephen Seo [Tue, 7 Sep 2021 11:24:47 +0000 (20:24 +0900)]
Make ThreadPool::getThreadCount() constexpr

3 years agoAdd tests for ThreadPool::getThreadCount()
Stephen Seo [Tue, 7 Sep 2021 11:21:20 +0000 (20:21 +0900)]
Add tests for ThreadPool::getThreadCount()

3 years agoAdd ThreadPool::getThreadCount()
Stephen Seo [Tue, 7 Sep 2021 11:18:41 +0000 (20:18 +0900)]
Add ThreadPool::getThreadCount()

Without the previously removed THREADCOUNT constant, there was no way to
query the ThreadCount from outside the class. This function provides
this.

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Tue, 7 Sep 2021 11:16:36 +0000 (20:16 +0900)]
Merge branch 'master' into cxx17

3 years agoRemove "THREADCOUNT" from ThreadPool
Stephen Seo [Tue, 7 Sep 2021 11:15:53 +0000 (20:15 +0900)]
Remove "THREADCOUNT" from ThreadPool

Redundant because "SIZE" provides the same value.

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Tue, 7 Sep 2021 09:29:17 +0000 (18:29 +0900)]
Merge branch 'master' into cxx17

3 years agoAdd missing include for "array"
Stephen Seo [Tue, 7 Sep 2021 09:28:44 +0000 (18:28 +0900)]
Add missing include for "array"

3 years agoModify .clangd specifying use of C++17
Stephen Seo [Tue, 7 Sep 2021 09:18:08 +0000 (18:18 +0900)]
Modify .clangd specifying use of C++17

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Tue, 7 Sep 2021 09:17:59 +0000 (18:17 +0900)]
Merge branch 'master' into cxx17

3 years agoAdd .clangd specifying use of C++14
Stephen Seo [Tue, 7 Sep 2021 09:17:31 +0000 (18:17 +0900)]
Add .clangd specifying use of C++14

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Tue, 7 Sep 2021 09:16:29 +0000 (18:16 +0900)]
Merge branch 'master' into cxx17

3 years agoMerge branch 'refactoring'
Stephen Seo [Tue, 7 Sep 2021 09:15:12 +0000 (18:15 +0900)]
Merge branch 'refactoring'

3 years agoWorkaround for gcc debug build fail
Stephen Seo [Tue, 7 Sep 2021 09:11:06 +0000 (18:11 +0900)]
Workaround for gcc debug build fail

Instead of defining temporary structs in functions, the temporary
structs are defined as part of the Manager class.

3 years agoHeavy refactorings
Stephen Seo [Tue, 7 Sep 2021 08:03:08 +0000 (17:03 +0900)]
Heavy refactorings

Use temporary structs instead of tuples.
Enforce max line width of 80 characters.
Fix warning related to ECTest.cpp .

Note that currently this commit appears to be unable to be built by GCC,
but compiles OK with Clang.

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Tue, 7 Sep 2021 03:24:48 +0000 (12:24 +0900)]
Merge branch 'master' into cxx17

3 years agoFix failing to wait for ThreadPool to finish
Stephen Seo [Tue, 7 Sep 2021 03:24:27 +0000 (12:24 +0900)]
Fix failing to wait for ThreadPool to finish

3 years agoAdd "if constexpr" where possible in Manager
Stephen Seo [Tue, 7 Sep 2021 03:13:28 +0000 (12:13 +0900)]
Add "if constexpr" where possible in Manager

3 years agoUse "if constexpr" in ThreadPool
Stephen Seo [Tue, 7 Sep 2021 03:11:36 +0000 (12:11 +0900)]
Use "if constexpr" in ThreadPool

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Tue, 7 Sep 2021 03:10:07 +0000 (12:10 +0900)]
Merge branch 'master' into cxx17

3 years agoFix CMakeLists.txt to use FindThreads
Stephen Seo [Tue, 7 Sep 2021 03:09:02 +0000 (12:09 +0900)]
Fix CMakeLists.txt to use FindThreads

3 years agoMerge branch 'threadpool'
Stephen Seo [Tue, 7 Sep 2021 03:07:05 +0000 (12:07 +0900)]
Merge branch 'threadpool'

3 years agoUpdate documentation
Stephen Seo [Tue, 7 Sep 2021 03:04:42 +0000 (12:04 +0900)]
Update documentation

3 years agoAllow ThreadPool to be created with < 2 ThreadCount
Stephen Seo [Tue, 7 Sep 2021 02:46:38 +0000 (11:46 +0900)]
Allow ThreadPool to be created with < 2 ThreadCount

3 years agoAdd isQueueEmpty() to ThreadPool
Stephen Seo [Tue, 7 Sep 2021 02:29:06 +0000 (11:29 +0900)]
Add isQueueEmpty() to ThreadPool

3 years agoTweak sleep times for threadpool to finish
Stephen Seo [Mon, 6 Sep 2021 12:01:01 +0000 (21:01 +0900)]
Tweak sleep times for threadpool to finish

Remove debug print

3 years agoUsage of ThreadPool fixes
Stephen Seo [Mon, 6 Sep 2021 11:57:13 +0000 (20:57 +0900)]
Usage of ThreadPool fixes

3 years agoWIP convert Manager to use ThreadPool
Stephen Seo [Mon, 6 Sep 2021 10:52:23 +0000 (19:52 +0900)]
WIP convert Manager to use ThreadPool

valgrind seems to report memory issues, and documentation may need more
updating.

3 years agoImpl ThreadPool
Stephen Seo [Mon, 6 Sep 2021 06:54:24 +0000 (15:54 +0900)]
Impl ThreadPool

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Mon, 17 May 2021 03:34:26 +0000 (12:34 +0900)]
Merge branch 'master' into cxx17

3 years agoAdd UnitTest for previously fixed bug
Stephen Seo [Mon, 17 May 2021 03:34:12 +0000 (12:34 +0900)]
Add UnitTest for previously fixed bug

3 years agoMerge branch 'master' into cxx17
Stephen Seo [Sun, 16 May 2021 11:08:25 +0000 (20:08 +0900)]
Merge branch 'master' into cxx17

3 years agoUpdate LICENSE year
Stephen Seo [Sun, 16 May 2021 11:08:06 +0000 (20:08 +0900)]
Update LICENSE year

3 years agoFix bug using callForMatchingFunction(s)
Stephen Seo [Sun, 16 May 2021 11:07:14 +0000 (20:07 +0900)]
Fix bug using callForMatchingFunction(s)

Fixed bug where invalid entity ids were used when using the
callForMatchingFunction(s) functions.

5 years agoMerge branch 'master' into cxx17
Stephen Seo [Wed, 6 Nov 2019 07:44:38 +0000 (16:44 +0900)]
Merge branch 'master' into cxx17

5 years agoUpdate LICENSE year
Stephen Seo [Wed, 6 Nov 2019 07:44:28 +0000 (16:44 +0900)]
Update LICENSE year

5 years agoMerge branch 'master' into cxx17
Stephen Seo [Wed, 6 Nov 2019 07:35:39 +0000 (16:35 +0900)]
Merge branch 'master' into cxx17

5 years agoAdd forMatchingSimple, refactorings
Stephen Seo [Wed, 6 Nov 2019 07:33:12 +0000 (16:33 +0900)]
Add forMatchingSimple, refactorings

5 years agoReplace vector with deque for Component storage
Stephen Seo [Wed, 6 Nov 2019 06:47:16 +0000 (15:47 +0900)]
Replace vector with deque for Component storage

When reallocating more data, vector moves the original data to a new
buffer. Deque preserves the location of the original data, preventing
invalidated pointers to existing data when additional allocation is
required.

5 years agoAdd fn to Manager allowing iterable indices as sig
Stephen Seo [Thu, 11 Jul 2019 12:11:03 +0000 (21:11 +0900)]
Add fn to Manager allowing iterable indices as sig

As an alternative to forMatchingSignatures, which calls the given
function on entities matching the given Components/Tags in the
signature, forMatchingIterable allows filtering entities by an iterable
of indices that corresponds to Components/Tags.

5 years agoMinor whitespace fixes, minor .gitignore change
Stephen Seo [Thu, 11 Jul 2019 10:47:39 +0000 (19:47 +0900)]
Minor whitespace fixes, minor .gitignore change

6 years agoUse "if constexpr" provided by C++17
Stephen Seo [Mon, 21 May 2018 10:19:43 +0000 (19:19 +0900)]
Use "if constexpr" provided by C++17

6 years agoFix stored functions not being called in order
Stephen Seo [Thu, 22 Nov 2018 05:28:31 +0000 (14:28 +0900)]
Fix stored functions not being called in order

Manager::callForMatchingFunctions should now call all functions in the
order they were added.

6 years agoAdd static_assert, components must be def-const
Stephen Seo [Tue, 11 Sep 2018 03:16:04 +0000 (12:16 +0900)]
Add static_assert, components must be def-const

EC::Manager will fail to compile if any given Component is not default
constructible, so a static_assert and ctest was added.

6 years agoAPI change: context/userdata provided to functions
Stephen Seo [Wed, 8 Aug 2018 07:52:12 +0000 (16:52 +0900)]
API change: context/userdata provided to functions

All functions called by EC/Manager now accept an additional parameter
as a void* to support user-provided data (or context) for functions
(useful when the function is not a lambda function and doesn't have any
other data stored with it).

6 years agoFix C++14 requirement in CMakeLists.txt
Stephen Seo [Mon, 21 May 2018 10:23:25 +0000 (19:23 +0900)]
Fix C++14 requirement in CMakeLists.txt

6 years agoUpdate README.md
Stephen Seo [Mon, 21 May 2018 07:49:37 +0000 (16:49 +0900)]
Update README.md

6 years agoUpdate LICENSE year
Stephen Seo [Mon, 21 May 2018 07:46:31 +0000 (16:46 +0900)]
Update LICENSE year

6 years agoMinor fixes/improvements
Stephen Seo [Sat, 19 May 2018 07:09:31 +0000 (16:09 +0900)]
Minor fixes/improvements

6 years agoUpdate documentation
Stephen Seo [Fri, 18 May 2018 11:47:34 +0000 (20:47 +0900)]
Update documentation

6 years agoAdd ability to handle unknown types
Stephen Seo [Thu, 17 May 2018 08:05:49 +0000 (17:05 +0900)]
Add ability to handle unknown types

EC/Manager and EC/Bitset can now handle types that are not known
(Components or Tags not in the given Components or Tags when created).

Manager::getEntityData now returns a pointer instead of a reference.
Functions passed to Manager::forMatchingFunction (and other similar fns)
should now accept Component fields as pointer types, not reference
types.

6 years agoFix warning about unused capture for lambda fn
Stephen Seo [Wed, 16 May 2018 07:18:11 +0000 (16:18 +0900)]
Fix warning about unused capture for lambda fn