Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F79671340
static_communicator_dummy.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Aug 27, 16:20
Size
5 KB
Mime Type
text/x-c++
Expires
Thu, Aug 29, 16:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20152844
Attached To
rAKA akantu
static_communicator_dummy.hh
View Options
/**
* @file static_communicator_dummy.hh
*
* @author Nicolas Richart <nicolas.richart@epfl.ch>
*
* @date Wed Sep 01 17:57:12 2010
*
* @brief Class handling the parallel communications
*
* @section LICENSE
*
* Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* Akantu is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Akantu is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#ifndef __AKANTU_STATIC_COMMUNICATOR_DUMMY_HH__
#define __AKANTU_STATIC_COMMUNICATOR_DUMMY_HH__
/* -------------------------------------------------------------------------- */
#include "aka_common.hh"
#include "real_static_communicator.hh"
/* -------------------------------------------------------------------------- */
#include <vector>
/* -------------------------------------------------------------------------- */
__BEGIN_AKANTU__
class
StaticCommunicatorDummy
:
public
RealStaticCommunicator
{
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public
:
StaticCommunicatorDummy
(
__attribute__
((
unused
))
int
&
argc
,
__attribute__
((
unused
))
char
**&
argv
)
:
RealStaticCommunicator
(
argc
,
argv
)
{
prank
=
0
;
psize
=
1
;
};
virtual
~
StaticCommunicatorDummy
(){};
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public
:
template
<
typename
T
>
void
send
(
__attribute__
((
unused
))
T
*
buffer
,
__attribute__
((
unused
))
Int
size
,
__attribute__
((
unused
))
Int
receiver
,
__attribute__
((
unused
))
Int
tag
)
{}
template
<
typename
T
>
void
receive
(
__attribute__
((
unused
))
T
*
buffer
,
__attribute__
((
unused
))
Int
size
,
__attribute__
((
unused
))
Int
sender
,
__attribute__
((
unused
))
Int
tag
)
{}
template
<
typename
T
>
CommunicationRequest
*
asyncSend
(
__attribute__
((
unused
))
T
*
buffer
,
__attribute__
((
unused
))
Int
size
,
__attribute__
((
unused
))
Int
receiver
,
__attribute__
((
unused
))
Int
tag
)
{
return
new
CommunicationRequest
(
0
,
0
);
}
template
<
typename
T
>
CommunicationRequest
*
asyncReceive
(
__attribute__
((
unused
))
T
*
buffer
,
__attribute__
((
unused
))
Int
size
,
__attribute__
((
unused
))
Int
sender
,
__attribute__
((
unused
))
Int
tag
)
{
return
new
CommunicationRequest
(
0
,
0
);
}
template
<
typename
T
>
inline
void
probe
(
__attribute__
((
unused
))
Int
sender
,
__attribute__
((
unused
))
Int
tag
,
__attribute__
((
unused
))
CommunicationStatus
&
status
)
{}
bool
testRequest
(
__attribute__
((
unused
))
CommunicationRequest
*
request
)
{
return
true
;
};
void
wait
(
__attribute__
((
unused
))
CommunicationRequest
*
request
){};
void
waitAll
(
__attribute__
((
unused
))
std
::
vector
<
CommunicationRequest
*>
&
requests
){};
void
barrier
(){};
template
<
typename
T
>
void
allReduce
(
__attribute__
((
unused
))
T
*
values
,
__attribute__
((
unused
))
int
nb_values
,
__attribute__
((
unused
))
const
SynchronizerOperation
&
op
)
{}
template
<
typename
T
>
inline
void
allGather
(
__attribute__
((
unused
))
T
*
values
,
__attribute__
((
unused
))
int
nb_values
)
{}
template
<
typename
T
>
inline
void
allGatherV
(
__attribute__
((
unused
))
T
*
values
,
__attribute__
((
unused
))
int
*
nb_values
)
{}
template
<
typename
T
>
inline
void
gather
(
__attribute__
((
unused
))
T
*
values
,
__attribute__
((
unused
))
int
nb_values
,
__attribute__
((
unused
))
int
root
=
0
)
{}
template
<
typename
T
>
inline
void
gatherV
(
__attribute__
((
unused
))
T
*
values
,
__attribute__
((
unused
))
int
*
nb_values
,
__attribute__
((
unused
))
int
root
=
0
)
{}
template
<
typename
T
>
inline
void
broadcast
(
__attribute__
((
unused
))
T
*
values
,
__attribute__
((
unused
))
int
nb_values
,
__attribute__
((
unused
))
int
root
=
0
)
{}
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public
:
/* ------------------------------------------------------------------------ */
int
getMaxTag
()
{
return
std
::
numeric_limits
<
int
>::
max
();
}
int
getMinTag
()
{
return
0
;
}
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
};
__END_AKANTU__
#endif
/* __AKANTU_STATIC_COMMUNICATOR_DUMMY_HH__ */
Event Timeline
Log In to Comment