Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thallium
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
sds
thallium
Commits
f1f532cf
Commit
f1f532cf
authored
Nov 22, 2017
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
started integrating serialization
parent
f71d04a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
24 deletions
+17
-24
include/thallium/callable_remote_procedure.hpp
include/thallium/callable_remote_procedure.hpp
+17
-24
No files found.
include/thallium/callable_remote_procedure.hpp
View file @
f1f532cf
...
...
@@ -3,8 +3,11 @@
#include <tuple>
#include <cstdint>
#include <utility>
#include <margo.h>
#include <thallium/buffer.hpp>
#include <thallium/serialization/stl/vector.hpp>
#include <thallium/serialization/buffer_output_archive.hpp>
namespace
thallium
{
...
...
@@ -22,6 +25,15 @@ private:
callable_remote_procedure
(
hg_id_t
id
,
const
endpoint
&
ep
,
bool
ignore_resp
);
auto
forward
(
const
buffer
&
buf
)
const
{
margo_forward
(
m_handle
,
const_cast
<
void
*>
(
static_cast
<
const
void
*>
(
&
buf
)));
buffer
output
;
if
(
m_ignore_response
)
return
output
;
margo_get_output
(
m_handle
,
&
output
);
margo_free_output
(
m_handle
,
&
output
);
// won't do anything on a buffer type
return
output
;
}
public:
callable_remote_procedure
(
const
callable_remote_procedure
&
other
)
{
...
...
@@ -69,30 +81,11 @@ public:
}
template
<
typename
...
T
>
auto
operator
()(
const
T
&
...
t
)
const
{
// TODO throw an exception if handle is null
// buffer input;
// BufferOutputArchive arch(input);
// serialize_many(arch, std::forward<T>(t)...);
// serialize(std::forward<T>(t)
// auto input = std::tie(t...);
margo_forward
(
m_handle
,
nullptr
);
// Buffer output;
//margo_get_output(m_handle, &output);
return
true
;
//Pack(std::move(output));
}
auto
operator
()(
const
buffer
&
buf
)
const
{
margo_forward
(
m_handle
,
const_cast
<
void
*>
(
static_cast
<
const
void
*>
(
&
buf
)));
buffer
output
;
if
(
m_ignore_response
)
return
output
;
margo_get_output
(
m_handle
,
&
output
);
margo_free_output
(
m_handle
,
&
output
);
// won't do anything on a buffer type
return
output
;
auto
operator
()(
T
&&
...
t
)
const
{
buffer
b
;
buffer_output_archive
arch
(
b
);
serialize_many
(
arch
,
std
::
forward
<
T
>
(
t
)...);
return
forward
(
b
);
}
};
...
...
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