Home
last modified time | relevance | path

Searched refs:marl (Results 1 – 25 of 135) sorted by relevance

123456

/third_party/skia/third_party/externals/swiftshader/third_party/marl/src/
Dscheduler_test.cpp25 auto scheduler = std::unique_ptr<marl::Scheduler>( in TEST_F()
26 new marl::Scheduler(marl::Scheduler::Config())); in TEST_F()
30 auto scheduler = std::unique_ptr<marl::Scheduler>( in TEST_F()
31 new marl::Scheduler(marl::Scheduler::Config())); in TEST_F()
33 auto got = marl::Scheduler::get(); in TEST_F()
36 got = marl::Scheduler::get(); in TEST_F()
41 marl::Scheduler::Config cfg; in TEST_F()
44 auto scheduler = std::unique_ptr<marl::Scheduler>(new marl::Scheduler(cfg)); in TEST_F()
54 marl::schedule([&] { counter++; }); in TEST_P()
57 auto scheduler = marl::Scheduler::get(); in TEST_P()
[all …]
Devent_test.cpp33 for (auto mode : {marl::Event::Mode::Manual, marl::Event::Mode::Auto}) { in TEST_P()
34 auto event = marl::Event(mode); in TEST_P()
45 auto event = marl::Event(marl::Event::Mode::Auto); in TEST_P()
53 auto event = marl::Event(marl::Event::Mode::Manual); in TEST_P()
62 auto event = marl::Event(marl::Event::Mode::Auto); in TEST_P()
63 auto done = marl::Event(marl::Event::Mode::Auto); in TEST_P()
66 marl::schedule([=, &counter] { in TEST_P()
87 auto event = marl::Event(marl::Event::Mode::Manual); in TEST_P()
88 auto wg = marl::WaitGroup(3); in TEST_P()
90 marl::schedule([=, &counter] { in TEST_P()
[all …]
Devent_bench.cpp25 marl::containers::vector<marl::Event, 1> events; in BENCHMARK_DEFINE_F()
28 marl::Event prev = events[i]; in BENCHMARK_DEFINE_F()
29 marl::Event next = events[i + 1]; in BENCHMARK_DEFINE_F()
30 marl::schedule([=] { in BENCHMARK_DEFINE_F()
46 marl::Event passToA(marl::Event::Mode::Auto); in BENCHMARK_DEFINE_F()
47 marl::Event passToB(marl::Event::Mode::Auto); in BENCHMARK_DEFINE_F()
48 marl::Event done(marl::Event::Mode::Auto); in BENCHMARK_DEFINE_F()
50 marl::schedule(marl::Task( in BENCHMARK_DEFINE_F()
57 marl::Task::Flags::SameThread)); in BENCHMARK_DEFINE_F()
59 marl::schedule(marl::Task( in BENCHMARK_DEFINE_F()
[all …]
Dpool_test.cpp22 marl::UnboundedPool<int> pool; in TEST_P()
26 marl::BoundedPool<int, 10> pool; in TEST_P()
30 marl::UnboundedPool<int>::Loan loan; in TEST_P()
35 marl::BoundedPool<int, 10>::Loan loan; in TEST_P()
40 marl::UnboundedPool<int> pool; in TEST_P()
47 marl::UnboundedPool<int> pool; in TEST_P()
49 marl::WaitGroup wg(iterations); in TEST_P()
51 marl::schedule([=] { in TEST_P()
60 marl::BoundedPool<int, 100> pool; in TEST_P()
67 marl::BoundedPool<int, 10> pool; in TEST_P()
[all …]
Dconditionvariable_test.cpp25 marl::mutex mutex; in TEST_F()
26 marl::ConditionVariable cv; in TEST_F()
30 marl::lock lock(mutex); in TEST_F()
47 marl::lock lock(mutex); in TEST_F()
68 marl::mutex mutex; in TEST_P()
69 marl::ConditionVariable cv; in TEST_P()
73 marl::lock lock(mutex); in TEST_P()
90 marl::lock lock(mutex); in TEST_P()
115 marl::mutex mutex; in TEST_P()
116 marl::ConditionVariable cv; in TEST_P()
[all …]
Dthread_test.cpp21 marl::Thread::Core core(int idx) { in core()
22 marl::Thread::Core c; in core()
30 auto affinity = marl::Thread::Affinity( in TEST_F()
42 auto affinity = marl::Thread::Affinity( in TEST_F()
52 .add(marl::Thread::Affinity( in TEST_F()
58 .add(marl::Thread::Affinity({core(35)}, allocator)); in TEST_F()
71 auto affinity = marl::Thread::Affinity( in TEST_F()
81 .remove(marl::Thread::Affinity( in TEST_F()
87 .remove(marl::Thread::Affinity({core(40)}, allocator)); in TEST_F()
95 auto affinity = marl::Thread::Affinity::all(allocator); in TEST_F()
[all …]
Dcontainers_test.cpp27 marl::containers::vector<std::string, 4> vector(allocator); in TEST_F()
32 marl::containers::vector<std::string, 4> vector(allocator); in TEST_F()
46 marl::containers::vector<std::string, 1> vector(allocator); in TEST_F()
60 marl::containers::vector<std::string, 4> vector(allocator); in TEST_F()
94 marl::containers::vector<std::string, 2> vector(allocator); in TEST_F()
128 marl::containers::vector<std::string, 4> vectorA(allocator); in TEST_F()
135 marl::containers::vector<std::string, 4> vectorB(vectorA, allocator); in TEST_F()
143 marl::containers::vector<std::string, 4> vectorA(allocator); in TEST_F()
150 marl::containers::vector<std::string, 2> vectorB(vectorA, allocator); in TEST_F()
158 marl::containers::vector<std::string, 4> vectorA(allocator); in TEST_F()
[all …]
Dblockingcall_test.cpp27 marl::WaitGroup wg(100); in TEST_P()
29 marl::schedule([=] { in TEST_P()
31 marl::blocking_call([=] { in TEST_P()
46 marl::WaitGroup wg(100); in TEST_P()
49 marl::schedule([=, &n] { in TEST_P()
51 n += marl::blocking_call([=] { in TEST_P()
66 marl::WaitGroup wg(1); in TEST_P()
67 marl::schedule([=] { in TEST_P()
68 marl::blocking_call([=] { marl::schedule([=] { wg.done(); }); }); in TEST_P()
Dosfiber_test.cpp30 auto main = marl::OSFiber::createFiberFromCurrentThread(allocator); in TEST_F()
31 marl::Allocator::unique_ptr<marl::OSFiber> fiberA, fiberB, fiberC; in TEST_F()
32 fiberC = marl::OSFiber::createFiber(allocator, fiberStackSize, [&] { in TEST_F()
36 fiberB = marl::OSFiber::createFiber(allocator, fiberStackSize, [&] { in TEST_F()
40 fiberA = marl::OSFiber::createFiber(allocator, fiberStackSize, [&] { in TEST_F()
57 auto main = marl::OSFiber::createFiberFromCurrentThread(allocator); in TEST_F()
58 marl::Allocator::unique_ptr<marl::OSFiber> fiber; in TEST_F()
59 fiber = marl::OSFiber::createFiber(allocator, fiberStackSize, [&] { in TEST_F()
Dmarl_test.h35 allocator = new marl::TrackedAllocator(marl::Allocator::Default); in SetUp()
45 marl::TrackedAllocator* allocator = nullptr;
53 allocator = new marl::TrackedAllocator(marl::Allocator::Default); in SetUp()
57 marl::Scheduler::Config cfg; in SetUp()
62 auto scheduler = new marl::Scheduler(cfg); in SetUp()
67 auto scheduler = marl::Scheduler::get(); in TearDown()
77 marl::TrackedAllocator* allocator = nullptr;
Dscheduler_bench.cpp25 marl::schedule([] {}); in BENCHMARK_DEFINE_F()
36 marl::WaitGroup wg; in BENCHMARK_DEFINE_F()
39 marl::schedule([=] { in BENCHMARK_DEFINE_F()
52 marl::Scheduler::Config cfg; in BENCHMARK_DEFINE_F()
54 marl::Thread::Affinity::Policy::oneOf(marl::Thread::Affinity::all())); in BENCHMARK_DEFINE_F()
57 marl::WaitGroup wg; in BENCHMARK_DEFINE_F()
60 marl::schedule([=] { in BENCHMARK_DEFINE_F()
Dwaitgroup_test.cpp20 marl::WaitGroup wg(2); // Should not require a scheduler. in TEST_F()
27 marl::WaitGroup wg(2); // Should not require a scheduler. in TEST_F()
35 marl::WaitGroup wg(1); in TEST_P()
37 marl::schedule([&counter, wg] { in TEST_P()
46 marl::WaitGroup wg(10); in TEST_P()
49 marl::schedule([&counter, wg] { in TEST_P()
/third_party/skia/third_party/externals/swiftshader/third_party/marl/
DREADME.md18 #include "marl/defer.h"
19 #include "marl/event.h"
20 #include "marl/scheduler.h"
21 #include "marl/waitgroup.h"
26 // Create a marl scheduler using all the logical processors available to the process.
27 // Bind this scheduler to the main thread so we can call marl::schedule()
28 marl::Scheduler scheduler(marl::Scheduler::Config::allCores());
35 marl::Event sayHello(marl::Event::Mode::Manual);
38 marl::WaitGroup saidHello(numTasks);
43 marl::schedule([=] { // All marl primitives are capture-by-value.
[all …]
DBUILD.gn25 "include/marl/blockingcall.h",
26 "include/marl/conditionvariable.h",
27 "include/marl/containers.h",
28 "include/marl/debug.h",
29 "include/marl/defer.h",
30 "include/marl/event.h",
31 "include/marl/finally.h",
32 "include/marl/memory.h",
33 "include/marl/mutex.h",
34 "include/marl/parallelize.h",
[all …]
DCMakeLists.txt48 option_if_not_defined(MARL_BUILD_SHARED "Build marl as a shared / dynamic library (default static)"…
49 option_if_not_defined(MARL_ASAN "Build marl with address sanitizer" OFF)
50 option_if_not_defined(MARL_MSAN "Build marl with memory sanitizer" OFF)
51 option_if_not_defined(MARL_TSAN "Build marl with thread sanitizer" OFF)
52 option_if_not_defined(MARL_INSTALL "Create marl install target" OFF)
248 # marl
250 add_library(marl SHARED ${MARL_LIST}) target
252 target_compile_definitions(marl
258 add_library(marl ${MARL_LIST}) target
263 target_compile_options(marl PRIVATE "-fvisibility=hidden")
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/marl/docs/
Dscheduler.md1 # `marl::Scheduler`
5 - [`marl::Scheduler`](#marlscheduler)
10 - [`marl::Scheduler::Worker::run()`](#marlschedulerworkerrun)
11 - [`marl::Scheduler::Worker::runUntilIdle()`](#marlschedulerworkerrununtilidle)
12 - [`marl::Scheduler::Worker::waitForWork()`](#marlschedulerworkerwaitforwork)
13 - [`marl::Scheduler::Worker::spinForWork()`](#marlschedulerworkerspinforwork)
14 - [`marl::Scheduler::Worker::suspend()`](#marlschedulerworkersuspend)
19 The `marl::Scheduler` is the most complex part of marl and is responsible for executing tasks and k…
25 The scheduler must be bound to each thread that calls `marl::schedule()`.
28 Binding is made using the `marl::Scheduler::bind()` and `marl::Scheduler::unbind()` methods.
[all …]
/third_party/skia/third_party/externals/swiftshader/src/Vulkan/Debug/
DThread.cpp31 marl::lock lock(mutex); in setName()
37 marl::lock lock(mutex); in name()
41 void Thread::onLocationUpdate(marl::lock &lock) in onLocationUpdate()
99 marl::lock lock(mutex); in enter()
116 marl::lock lock(mutex); in exit()
126 marl::lock lock(mutex); in update()
145 marl::lock lock(mutex); in frame()
151 marl::lock lock(mutex); in stack()
163 marl::lock lock(mutex); in depth()
169 marl::lock lock(mutex); in state()
[all …]
/third_party/skia/third_party/externals/swiftshader/src/Vulkan/
DVkTimelineSemaphore.cpp31 …shared = marl::Allocator::Default->make_shared<TimelineSemaphore::Shared>(marl::Allocator::Default… in TimelineSemaphore()
38 …shared = marl::Allocator::Default->make_shared<TimelineSemaphore::Shared>(marl::Allocator::Default… in TimelineSemaphore()
57 marl::lock lock(mutex); in signal()
76 marl::lock lock(mutex); in wait()
87 marl::lock lock(mutex); in getCounterValue()
93 TimelineSemaphore::Shared::Shared(marl::Allocator *allocator, uint64_t initialState) in Shared()
102 marl::lock lock(mutex); in signal()
127 marl::lock lock(mutex); in addDependent()
138 marl::lock lock(mutex); in addDependency()
/third_party/skia/third_party/externals/swiftshader/third_party/marl/examples/
Dtasks_in_tasks.cpp26 marl::Scheduler::Config cfg; in main()
29 marl::Scheduler scheduler(cfg); in main()
50 marl::WaitGroup a_wg(1); in main()
53 marl::schedule([=] { in main()
61 marl::WaitGroup bc_wg(2); in main()
64 marl::schedule([=] { in main()
70 marl::schedule([=] { in main()
Dhello_task.cpp27 marl::Scheduler::Config cfg; in main()
30 marl::Scheduler scheduler(cfg); in main()
37 marl::Event sayHello(marl::Event::Mode::Manual); in main()
40 marl::WaitGroup saidHello(numTasks); in main()
45 marl::schedule([=] { // All marl primitives are capture-by-value. in main()
/third_party/skia/third_party/externals/swiftshader/src/System/
DSynchronization.hpp48 : ev(marl::Event::Mode::Manual, signalled) in CountedEvent()
99 const marl::Event &event() { return ev; } in event()
102 const marl::WaitGroup wg;
103 const marl::Event ev;
133 marl::mutex mutex;
145 marl::lock lock(mutex); in take()
156 marl::lock lock(mutex); in tryTake()
169 marl::lock lock(mutex); in put()
177 marl::lock lock(mutex); in count()
/third_party/skia/third_party/externals/swiftshader/third_party/marl/include/marl/
Dconditionvariable.h28 namespace marl {
51 MARL_NO_EXPORT inline void wait(marl::lock& lock, Predicate&& pred);
59 marl::lock& lock,
69 marl::lock& lock,
79 marl::mutex mutex;
95 marl::lock lock(mutex); in notify_one()
111 marl::lock lock(mutex); in notify_all()
122 void ConditionVariable::wait(marl::lock& lock, Predicate&& pred) { in wait()
151 marl::lock& lock, in wait_for()
159 marl::lock& lock, in wait_until()
Dticket.h22 namespace marl {
108 MARL_NO_EXPORT inline void callAndUnlock(marl::lock& lock);
123 marl::mutex mutex;
139 marl::lock lock(record->shared->mutex); in wait()
149 marl::lock lock(record->shared->mutex); in onCall()
151 marl::schedule(std::forward<Function>(f)); in onCall()
196 marl::lock lock(shared->mutex); in take()
220 marl::lock lock(shared->mutex); in done()
229 void Ticket::Record::callAndUnlock(marl::lock& lock) { in callAndUnlock()
240 marl::schedule(std::move(callback)); in callAndUnlock()
Devent.h25 namespace marl {
121 marl::mutex mutex;
135 marl::lock lock(mutex); in signal()
151 marl::lock lock(mutex); in wait()
161 marl::lock lock(mutex); in wait_for()
174 marl::lock lock(mutex); in wait_until()
194 marl::lock lock(shared->mutex); in clear()
214 marl::lock lock(shared->mutex); in test()
225 marl::lock lock(shared->mutex); in isSignalled()
234 marl::lock lock(s->mutex); in any()
/third_party/skia/third_party/externals/swiftshader/src/Device/
DRenderer.hpp123 using Pool = marl::BoundedPool<BatchData, MaxBatchCount, marl::PoolPolicy::Preserve>;
132 marl::Ticket clusterTickets[MaxClusterCount];
135 using Pool = marl::BoundedPool<DrawCall, MaxDrawCount, marl::PoolPolicy::Preserve>;
141 …static void run(vk::Device *device, const marl::Loan<DrawCall> &draw, marl::Ticket::Queue *tickets…
144 …xels(vk::Device *device, const marl::Loan<DrawCall> &draw, const marl::Loan<BatchData> &batch, con…
228 marl::Ticket::Queue drawTickets;
229 marl::Ticket::Queue clusterQueues[MaxClusterCount];

123456