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
520d24e6
Commit
520d24e6
authored
Nov 28, 2017
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed endpoint internal engine to pointer
parent
07eaf7fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
include/thallium/endpoint.hpp
include/thallium/endpoint.hpp
+5
-2
src/callable_remote_procedure.cpp
src/callable_remote_procedure.cpp
+1
-1
src/endpoint.cpp
src/endpoint.cpp
+9
-9
No files found.
include/thallium/endpoint.hpp
View file @
520d24e6
...
...
@@ -21,14 +21,17 @@ class endpoint {
private:
engine
&
m_engine
;
engine
*
m_engine
;
hg_addr_t
m_addr
;
endpoint
(
engine
&
e
,
hg_addr_t
addr
)
:
m_engine
(
e
),
m_addr
(
addr
)
{}
:
m_engine
(
&
e
),
m_addr
(
addr
)
{}
public:
endpoint
()
:
m_engine
(
nullptr
),
m_addr
(
HG_ADDR_NULL
)
{}
endpoint
(
const
endpoint
&
other
);
endpoint
(
endpoint
&&
other
)
...
...
src/callable_remote_procedure.cpp
View file @
520d24e6
...
...
@@ -13,7 +13,7 @@ namespace thallium {
callable_remote_procedure
::
callable_remote_procedure
(
hg_id_t
id
,
const
endpoint
&
ep
,
bool
ignore_resp
)
{
m_ignore_response
=
ignore_resp
;
// TODO throw exception if this call fails
margo_create
(
ep
.
m_engine
.
m_mid
,
ep
.
m_addr
,
id
,
&
m_handle
);
margo_create
(
ep
.
m_engine
->
m_mid
,
ep
.
m_addr
,
id
,
&
m_handle
);
}
}
src/endpoint.cpp
View file @
520d24e6
...
...
@@ -11,20 +11,20 @@ namespace thallium {
endpoint
::
endpoint
(
const
endpoint
&
other
)
:
m_engine
(
other
.
m_engine
)
{
if
(
other
.
m_addr
!=
HG_ADDR_NULL
)
{
margo_addr_dup
(
m_engine
.
m_mid
,
other
.
m_addr
,
&
m_addr
);
margo_addr_dup
(
m_engine
->
m_mid
,
other
.
m_addr
,
&
m_addr
);
}
else
{
m_addr
=
HG_ADDR_NULL
;
}
}
endpoint
&
endpoint
::
operator
=
(
const
endpoint
&
other
)
{
// TODO throw an exception if the two endpoints don't have the same m_margo
if
(
&
other
==
this
)
return
*
this
;
if
(
m_addr
!=
HG_ADDR_NULL
)
{
margo_addr_free
(
m_engine
.
m_mid
,
m_addr
);
margo_addr_free
(
m_engine
->
m_mid
,
m_addr
);
}
m_engine
=
other
.
m_engine
;
if
(
other
.
m_addr
!=
HG_ADDR_NULL
)
{
margo_addr_dup
(
m_engine
.
m_mid
,
other
.
m_addr
,
&
m_addr
);
margo_addr_dup
(
m_engine
->
m_mid
,
other
.
m_addr
,
&
m_addr
);
}
else
{
m_addr
=
HG_ADDR_NULL
;
}
...
...
@@ -32,11 +32,11 @@ endpoint& endpoint::operator=(const endpoint& other) {
}
endpoint
&
endpoint
::
operator
=
(
endpoint
&&
other
)
{
// TODO throw an exception if the two endpoints don't have the same m_margo
if
(
&
other
==
this
)
return
*
this
;
if
(
m_addr
!=
HG_ADDR_NULL
)
{
margo_addr_free
(
m_engine
.
m_mid
,
m_addr
);
margo_addr_free
(
m_engine
->
m_mid
,
m_addr
);
}
m_engine
=
other
.
m_engine
;
m_addr
=
other
.
m_addr
;
other
.
m_addr
=
HG_ADDR_NULL
;
return
*
this
;
...
...
@@ -44,7 +44,7 @@ endpoint& endpoint::operator=(endpoint&& other) {
endpoint
::~
endpoint
()
{
if
(
m_addr
!=
HG_ADDR_NULL
)
{
margo_addr_free
(
m_engine
.
m_mid
,
m_addr
);
margo_addr_free
(
m_engine
->
m_mid
,
m_addr
);
}
}
...
...
@@ -53,12 +53,12 @@ endpoint::operator std::string() const {
if
(
m_addr
==
HG_ADDR_NULL
)
return
std
::
string
();
hg_size_t
size
;
margo_addr_to_string
(
m_engine
.
m_mid
,
NULL
,
&
size
,
m_addr
);
margo_addr_to_string
(
m_engine
->
m_mid
,
NULL
,
&
size
,
m_addr
);
std
::
string
result
(
size
+
1
,
' '
);
size
+=
1
;
margo_addr_to_string
(
m_engine
.
m_mid
,
&
result
[
0
],
&
size
,
m_addr
);
margo_addr_to_string
(
m_engine
->
m_mid
,
&
result
[
0
],
&
size
,
m_addr
);
return
result
;
}
...
...
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