Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dtk
dtk
Commits
9ae5baaa
Commit
9ae5baaa
authored
Feb 11, 2013
by
NICLAUSSE Nicolas
Browse files
fix put & set
parent
8988f7dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/dtkDistributed/dtkDistributedCommunicator.cpp
View file @
9ae5baaa
...
...
@@ -76,7 +76,7 @@ qlonglong dtkDistributedCommunicator::allocate(qlonglong count, qlonglong size,
void
dtkDistributedCommunicator
::
get
(
qint32
from
,
qlonglong
position
,
void
*
array
,
qlonglong
buffer_id
)
{
}
QByteArray
dtkDistributedCommunicator
::
get
(
qint32
from
,
qlonglong
position
,
qlonglong
size
,
qlonglong
buffer_id
)
...
...
@@ -84,7 +84,7 @@ QByteArray dtkDistributedCommunicator::get(qint32 from, qlonglong position, qlon
return
QByteArray
();
}
void
dtkDistributedCommunicator
::
put
(
qint32
dest
,
qlonglong
position
,
qlonglong
size
,
const
QByteArray
&
data
,
qlonglong
buffer_id
)
void
dtkDistributedCommunicator
::
put
(
qint32
dest
,
qlonglong
position
,
void
*
data
,
qlonglong
buffer_id
)
{
}
...
...
src/dtkDistributed/dtkDistributedCommunicator.h
View file @
9ae5baaa
...
...
@@ -48,11 +48,7 @@ public:
virtual
QByteArray
get
(
qint32
from
,
qlonglong
position
,
qlonglong
size
,
qlonglong
buffer_id
);
public:
virtual
void
put
(
qint32
dest
,
qlonglong
position
,
qlonglong
size
,
const
QByteArray
&
data
,
qlonglong
buffer_id
);
// public:
// template<class T> T * get(qint32 from, qlonglong position, qlonglong size, qlonglong buffer_id);
// template<class T> void put(qint32 dest, qlonglong position, qlonglong size, const T &data, qlonglong buffer_id);
virtual
void
put
(
qint32
dest
,
qlonglong
position
,
void
*
data
,
qlonglong
buffer_id
);
public:
virtual
qint32
pid
(
void
);
...
...
src/dtkDistributed/dtkDistributedContainer.tpp
View file @
9ae5baaa
...
...
@@ -3,9 +3,9 @@
* Author: Thibaud Kloczko
* Created: Tue Feb 5 14:12:49 2013 (+0100)
* Version:
* Last-Updated: lun. févr. 11 1
1:08:38
2013 (+0100)
* Last-Updated: lun. févr. 11 1
3:53:13
2013 (+0100)
* By: Nicolas Niclausse
* Update #: 1
77
* Update #: 1
82
*/
/* Change Log:
...
...
@@ -55,7 +55,9 @@ template <typename T> qlonglong dtkDistributedContainer<T>::size(void) const
template
<
typename
T
>
void
dtkDistributedContainer
<
T
>::
set
(
const
qlonglong
&
global_id
,
const
T
&
value
)
{
m_buffer
[
m_mapper
->
globalToLocal
(
global_id
)]
=
value
;
qint32
owner
=
static_cast
<
qint32
>
(
m_mapper
->
owner
(
global_id
));
qlonglong
pos
=
m_mapper
->
globalToLocal
(
global_id
);
m_comm
->
put
(
owner
,
pos
,
&
(
const_cast
<
T
&>
(
value
)),
m_buffer_id
);
};
template
<
typename
T
>
void
dtkDistributedContainer
<
T
>::
setLocal
(
const
qlonglong
&
local_id
,
const
T
&
value
)
...
...
Write
Preview
Supports
Markdown
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