Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Fischer
emper
Commits
faadf709
Commit
faadf709
authored
5 years ago
by
Nicolas Pfeiffer
Browse files
Options
Downloads
Patches
Plain Diff
clean up in benchmarks
parent
b0894831
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
benchmarks/emper_continuation/CMakeLists.txt
+14
-0
14 additions, 0 deletions
benchmarks/emper_continuation/CMakeLists.txt
benchmarks/emper_continuation/emper_continuation.h
+10
-37
10 additions, 37 deletions
benchmarks/emper_continuation/emper_continuation.h
with
24 additions
and
37 deletions
benchmarks/emper_continuation/CMakeLists.txt
+
14
−
0
View file @
faadf709
...
@@ -37,3 +37,17 @@ target_link_libraries(rectmul_emper_continuation Threads::Threads emper)
...
@@ -37,3 +37,17 @@ target_link_libraries(rectmul_emper_continuation Threads::Threads emper)
add_executable
(
strassen_emper_continuation ../strassen.cpp
)
add_executable
(
strassen_emper_continuation ../strassen.cpp
)
target_link_libraries
(
strassen_emper_continuation Threads::Threads emper
)
target_link_libraries
(
strassen_emper_continuation Threads::Threads emper
)
add_test
(
cholesky cholesky_emper_continuation
)
add_test
(
fft fft_emper_continuation
)
add_test
(
fib fib_emper_continuation
)
add_test
(
heat heat_emper_continuation
)
add_test
(
integrate integrate_emper_continuation
)
add_test
(
knapsack knapsack_emper_continuation
)
add_test
(
lu lu_emper_continuation
)
add_test
(
matmul matmul_emper_continuation
)
add_test
(
nqueens nqueens_emper_continuation
)
add_test
(
quicksort quicksort_emper_continuation
)
add_test
(
rectmul rectmul_emper_continuation
)
add_test
(
strassen strassen_emper_continuation
)
This diff is collapsed.
Click to expand it.
benchmarks/emper_continuation/emper_continuation.h
+
10
−
37
View file @
faadf709
...
@@ -40,47 +40,20 @@ public:
...
@@ -40,47 +40,20 @@ public:
#include
"fork.h"
#include
"fork.h"
#ifndef EMPER_LOCKED_FIBRIL
#ifdef EMPER_LOCKED_FIBRIL
#define _fibril_inc_count(f)
#define fibril_fork_nrt(fp, fn, ag) do { \
#else
auto _fibril_##fn##_fork = [](_fibril_defs ag fibril_t * f) __attribute__((noinline, hot, optimize(3))) { \
#define _fibril_inc_count(f) \
(*f)->cont.ip = __builtin_return_address(0); \
if (!(*f)->incremented) { \
(*f)->incremented = 1; \
(*f)->count.fetch_add(1, std::memory_order_relaxed); \
} \
Runtime* runtime = Runtime::getRuntime(); \
runtime->pushBottom(**f); \
fn(_fibril_args ag); \
if (!runtime->popBottom()) { \
(*f)->resume(); \
} \
}; \
membar(_fibril_##fn##_fork(_fibril_expand ag fp)); \
} while (0);
#define fibril_fork_wrt(fp, rt, fn, ag) do { \
auto _fibril_##fn##_fork = [](_fibril_defs ag fibril_t * f, __typeof__(rt) p) __attribute__((noinline, hot, optimize(3))) { \
(*f)->cont.ip = __builtin_return_address(0); \
if (!(*f)->incremented) { \
if (!(*f)->incremented) { \
(*f)->incremented = 1; \
(*f)->incremented = 1; \
(*f)->count.fetch_add(1, std::memory_order_relaxed); \
(*f)->count.fetch_add(1, std::memory_order_relaxed); \
} \
}
Runtime* runtime = Runtime::getRuntime(); \
#endif
runtime->pushBottom(**f); \
*p = fn(_fibril_args ag); \
if (!runtime->popBottom()) { \
(*f)->resume(); \
} \
}; \
membar(_fibril_##fn##_fork(_fibril_expand ag fp, rt)); \
} while (0);
#else
#define fibril_fork_nrt(fp, fn, ag) do { \
#define fibril_fork_nrt(fp, fn, ag) do { \
auto _fibril_##fn##_fork = [](_fibril_defs ag fibril_t * f) __attribute__((noinline, hot, optimize(3))) { \
auto _fibril_##fn##_fork = [](_fibril_defs ag fibril_t * f) __attribute__((noinline, hot, optimize(3))) { \
(*f)->cont.ip = __builtin_return_address(0); \
(*f)->cont.ip = __builtin_return_address(0); \
_fibril_inc_count(f); \
Runtime* runtime = Runtime::getRuntime(); \
Runtime* runtime = Runtime::getRuntime(); \
runtime->pushBottom(**f); \
runtime->pushBottom(**f); \
fn(_fibril_args ag); \
fn(_fibril_args ag); \
...
@@ -94,6 +67,7 @@ public:
...
@@ -94,6 +67,7 @@ public:
#define fibril_fork_wrt(fp, rt, fn, ag) do { \
#define fibril_fork_wrt(fp, rt, fn, ag) do { \
auto _fibril_##fn##_fork = [](_fibril_defs ag fibril_t * f, __typeof__(rt) p) __attribute__((noinline, hot, optimize(3))) { \
auto _fibril_##fn##_fork = [](_fibril_defs ag fibril_t * f, __typeof__(rt) p) __attribute__((noinline, hot, optimize(3))) { \
(*f)->cont.ip = __builtin_return_address(0); \
(*f)->cont.ip = __builtin_return_address(0); \
_fibril_inc_count(f); \
Runtime* runtime = Runtime::getRuntime(); \
Runtime* runtime = Runtime::getRuntime(); \
runtime->pushBottom(**f); \
runtime->pushBottom(**f); \
*p = fn(_fibril_args ag); \
*p = fn(_fibril_args ag); \
...
@@ -104,7 +78,6 @@ public:
...
@@ -104,7 +78,6 @@ public:
membar(_fibril_##fn##_fork(_fibril_expand ag fp, rt)); \
membar(_fibril_##fn##_fork(_fibril_expand ag fp, rt)); \
} while (0);
} while (0);
#endif
#define fibril_rt_init(n) Runtime runtime; runtime.executeAndWait([&] () {
#define fibril_rt_init(n) Runtime runtime; runtime.executeAndWait([&] () {
//#define fibril_rt_init(n) Runtime runtime(2); runtime.executeAndWait([&] () {
//#define fibril_rt_init(n) Runtime runtime(2); runtime.executeAndWait([&] () {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment