* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid/modelchecker.h"
+#include "src/smpi/private.h"
#include "src/smpi/smpi_datatype_derived.hpp"
#include "src/smpi/smpi_op.hpp"
#include "src/smpi/smpi_process.hpp"
*ret = MPI_SUCCESS;
if(datatype->name_)
name_ = xbt_strdup(datatype->name_);
-
- if(!(datatype->attributes()->empty())){
+
+ if (not datatype->attributes()->empty()) {
int flag;
void* value_out;
for(auto it = datatype->attributes()->begin(); it != datatype->attributes()->end(); it++){
if (datatype->refcount_ > 0)
datatype->refcount_--;
- if (datatype->refcount_ == 0 && !(datatype->flags_ & DT_FLAG_PREDEFINED))
+ if (datatype->refcount_ == 0 && not(datatype->flags_ & DT_FLAG_PREDEFINED))
delete datatype;
#if SIMGRID_HAVE_MC
recvcount *= recvtype->size();
count = sendcount < recvcount ? sendcount : recvcount;
- if(!(sendtype->flags() & DT_FLAG_DERIVED) && !(recvtype->flags() & DT_FLAG_DERIVED)) {
- if(!smpi_process()->replaying())
+ if (not(sendtype->flags() & DT_FLAG_DERIVED) && not(recvtype->flags() & DT_FLAG_DERIVED)) {
+ if (not smpi_process()->replaying())
memcpy(recvbuf, sendbuf, count);
- }
- else if (!(sendtype->flags() & DT_FLAG_DERIVED))
- {
+ } else if (not(sendtype->flags() & DT_FLAG_DERIVED)) {
recvtype->unserialize( sendbuf, recvbuf, recvcount/recvtype->size(), MPI_REPLACE);
- }
- else if (!(recvtype->flags() & DT_FLAG_DERIVED))
- {
+ } else if (not(recvtype->flags() & DT_FLAG_DERIVED)) {
sendtype->serialize(sendbuf, recvbuf, sendcount/sendtype->size());
}else{
if(old_type->flags_ & DT_FLAG_DERIVED)
contiguous=false;
- if(!contiguous){
+ if (not contiguous) {
*new_type = new Type_Indexed(size * old_type->size(),lb,ub,
DT_FLAG_DERIVED|DT_FLAG_DATA, count, block_lengths, indices, old_type);
}else{
if (old_type->flags_ & DT_FLAG_DERIVED || lb!=0)
contiguous=false;
- if(!contiguous){
+ if (not contiguous) {
*new_type = new Type_Hindexed(size * old_type->size(),lb,ub,
DT_FLAG_DERIVED|DT_FLAG_DATA, count, block_lengths, indices, old_type);
}else{
forced_ub=true;
}
- if(!forced_lb && indices[i]+old_types[i]->lb()<lb)
+ if (not forced_lb && indices[i] + old_types[i]->lb() < lb)
lb = indices[i];
- if(!forced_ub && indices[i]+block_lengths[i]*old_types[i]->ub()>ub)
+ if (not forced_ub && indices[i] + block_lengths[i] * old_types[i]->ub() > ub)
ub = indices[i]+block_lengths[i]*old_types[i]->ub();
if ( (i< count -1) && (indices[i]+block_lengths[i]*static_cast<int>(old_types[i]->size()) != indices[i+1]) )
contiguous=false;
}
- if(!contiguous){
+ if (not contiguous) {
*new_type = new Type_Struct(size, lb,ub, DT_FLAG_DERIVED|DT_FLAG_DATA,
count, block_lengths, indices, old_types);
}else{