Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
51cc731e
Commit
51cc731e
authored
Apr 28, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distributed benchmark
parent
89e7d2cb
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
447 additions
and
9 deletions
+447
-9
benchmarks/Makefile.am
benchmarks/Makefile.am
+3
-1
benchmarks/distributed.cpp
benchmarks/distributed.cpp
+420
-0
benchmarks/utility.hpp
benchmarks/utility.hpp
+23
-8
cppa.files
cppa.files
+1
-0
No files found.
benchmarks/Makefile.am
View file @
51cc731e
...
...
@@ -3,12 +3,13 @@ ACLOCAL_AMFLAGS = -I ../m4
AM_CXXFLAGS
=
-I
../
--std
=
c++0x
-pedantic
-Wall
-Wextra
noinst_PROGRAMS
=
actor_creation mailbox_performance mixed_case matching
noinst_PROGRAMS
=
actor_creation mailbox_performance mixed_case matching
distributed
actor_creation_SOURCES
=
actor_creation.cpp
mailbox_performance_SOURCES
=
mailbox_performance.cpp
mixed_case_SOURCES
=
mixed_case.cpp
matching_SOURCES
=
matching.cpp
distributed_SOURCES
=
distributed.cpp
EXAMPLES_LIBS
=
-L
../.libs/
-lcppa
$(BOOST_LDFLAGS)
$(BOOST_THREAD_LIB)
...
...
@@ -16,3 +17,4 @@ actor_creation_LDADD = $(EXAMPLES_LIBS)
mailbox_performance_LDADD
=
$(EXAMPLES_LIBS)
mixed_case_LDADD
=
$(EXAMPLES_LIBS)
matching_LDADD
=
$(EXAMPLES_LIBS)
distributed_LDADD
=
$(EXAMPLES_LIBS)
benchmarks/distributed.cpp
0 → 100644
View file @
51cc731e
This diff is collapsed.
Click to expand it.
benchmarks/utility.hpp
View file @
51cc731e
...
...
@@ -32,10 +32,32 @@
#define UTILITY_HPP
#include <vector>
#include <string>
#include <sstream>
#include <stdexcept>
#include <algorithm>
#include "boost/thread.hpp"
inline
std
::
vector
<
std
::
string
>
split
(
std
::
string
const
&
str
,
char
delim
)
{
std
::
vector
<
std
::
string
>
result
;
std
::
stringstream
strs
{
str
};
std
::
string
tmp
;
while
(
std
::
getline
(
strs
,
tmp
,
delim
))
result
.
push_back
(
tmp
);
return
result
;
}
inline
std
::
string
join
(
std
::
vector
<
std
::
string
>
const
&
vec
,
std
::
string
const
&
delim
=
""
)
{
if
(
vec
.
empty
())
return
""
;
auto
result
=
vec
.
front
();
for
(
auto
i
=
vec
.
begin
()
+
1
;
i
!=
vec
.
end
();
++
i
)
{
result
+=
delim
;
result
+=
*
i
;
}
return
result
;
}
template
<
typename
T
>
T
rd
(
char
const
*
cstr
)
...
...
@@ -53,12 +75,6 @@ T rd(char const* cstr)
return
result
;
}
#ifdef __APPLE__
int
num_cores
()
{
return
static_cast
<
int
>
(
boost
::
thread
::
hardware_concurrency
());
}
#else
int
num_cores
()
{
char
cbuf
[
100
];
...
...
@@ -73,7 +89,6 @@ int num_cores()
*
i
=
'\0'
;
return
rd
<
int
>
(
cbuf
);
}
#endif
std
::
vector
<
uint64_t
>
factorize
(
uint64_t
n
)
{
...
...
cppa.files
View file @
51cc731e
...
...
@@ -268,3 +268,4 @@ cppa/detail/scheduled_actor_dummy.hpp
cppa/detail/nestable_receive_actor.hpp
cppa/detail/filter_result.hpp
benchmarks/PingPong.scala
benchmarks/distributed.cpp
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment