large code cleanup (#8364)

* Remove redundant qualifiers in filament public headers

* remove redundant qualifiers in filament implementation

* remove redundant qualifiers in libutils public headers

* remove redundant qualifier for libutils implementation

* remove redundant qualifiers for libmath

* use is_same_v<> instead of is_same<>

* bring back Builder::name()

we keep Builder::name() on all object, and forward to the MixIn class
that does the implementation, so that we have correct documentation, and
better IDE completion.

* add missing const parameters in filament's implementation

* various source cleanup

- missing includes
- missing const
- C cast style
- superfluous inline keyword
This commit is contained in:
Mathias Agopian
2025-01-17 17:50:16 -08:00
committed by GitHub
parent 1747ae8f5a
commit bef849b0e3
169 changed files with 1982 additions and 1910 deletions
+7 -7
View File
@@ -344,7 +344,7 @@ public:
}
// for debugging
friend utils::io::ostream& operator << (utils::io::ostream& out, JobSystem const& js);
friend io::ostream& operator << (io::ostream& out, JobSystem const& js);
// utility functions...
@@ -419,7 +419,7 @@ private:
void decRef(Job const* job) noexcept;
Job* allocateJob() noexcept;
JobSystem::ThreadState* getStateToStealFrom(JobSystem::ThreadState& state) noexcept;
ThreadState* getStateToStealFrom(ThreadState& state) noexcept;
static bool hasJobCompleted(Job const* job) noexcept;
void requestExit() noexcept;
@@ -427,8 +427,8 @@ private:
bool hasActiveJobs() const noexcept;
void loop(ThreadState* state) noexcept;
bool execute(JobSystem::ThreadState& state) noexcept;
Job* steal(JobSystem::ThreadState& state) noexcept;
bool execute(ThreadState& state) noexcept;
Job* steal(ThreadState& state) noexcept;
void finish(Job* job) noexcept;
void put(WorkQueue& workQueue, Job* job) noexcept;
@@ -446,10 +446,10 @@ private:
Condition mWaiterCondition;
std::atomic<int32_t> mActiveJobs = { 0 };
utils::Arena<utils::ObjectPoolAllocator<Job>, LockingPolicy::Mutex> mJobPool;
Arena<ObjectPoolAllocator<Job>, LockingPolicy::Mutex> mJobPool;
template <typename T>
using aligned_vector = std::vector<T, utils::STLAlignedAllocator<T>>;
using aligned_vector = std::vector<T, STLAlignedAllocator<T>>;
// These are essentially const, make sure they're on a different cache-lines than the
// read-write atomics.
@@ -596,7 +596,7 @@ JobSystem::Job* parallel_for(JobSystem& js, JobSystem::Job* parent,
// parallel jobs on a Slice<>
template<typename T, typename S, typename F>
JobSystem::Job* parallel_for(JobSystem& js, JobSystem::Job* parent,
utils::Slice<T> slice, F functor, const S& splitter) noexcept {
Slice<T> slice, F functor, const S& splitter) noexcept {
return parallel_for(js, parent, slice.data(), slice.size(), functor, splitter);
}