-/* Copyright (c) 2012, 2014-2015. The SimGrid Team.
+/* Copyright (c) 2012, 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
type_t ret = nullptr;
- char white[INSTR_DEFAULT_STR_SIZE] = "1 1 1";
if (not color) {
+ char white[INSTR_DEFAULT_STR_SIZE] = "1 1 1";
ret = newType (name, name, white, TYPE_VARIABLE, father);
}else{
ret = newType (name, name, color, TYPE_VARIABLE, father);
-/* Copyright (c) 2013-2014. The SimGrid Team.
+/* Copyright (c) 2013-2014, 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
static void print_buffer_int(void *buf, int len, char *msg, int rank)
{
- int* v;
printf("[%d] %s (#%d): ", rank, msg, len);
for (int tmp = 0; tmp < len; tmp++) {
- v = buf;
+ int *v = buf;
printf("[%d]", v[tmp]);
}
printf("\n");
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
int retval;
int sendcount = 1; // one double to each process
int recvcount = 1;
- int i;
double *sndbuf = NULL;
double rcvd;
int root = 0; // arbitrary choice
// on root, initialize sendbuf
if (root == rank) {
sndbuf = malloc(size * sizeof(double));
- for (i = 0; i < size; i++) {
+ for (int i = 0; i < size; i++) {
sndbuf[i] = (double) i;
}
}