A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Port to ARM
[simgrid.git]
/
src
/
gras
/
DataDesc
/
ddt_convert.c
diff --git
a/src/gras/DataDesc/ddt_convert.c
b/src/gras/DataDesc/ddt_convert.c
index
6a82100
..
efc4946
100644
(file)
--- a/
src/gras/DataDesc/ddt_convert.c
+++ b/
src/gras/DataDesc/ddt_convert.c
@@
-14,7
+14,7
@@
#include "gras/DataDesc/datadesc_private.h"
#include "gras/DataDesc/datadesc_private.h"
-
GRAS
_LOG_NEW_DEFAULT_SUBCATEGORY(ddt_convert,datadesc,
+
XBT
_LOG_NEW_DEFAULT_SUBCATEGORY(ddt_convert,datadesc,
"Inter-architecture convertions");
/***
"Inter-architecture convertions");
/***
@@
-24,26
+24,29
@@
GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(ddt_convert,datadesc,
*** l C<1/1> I<2/2:4/4:8/8:8/8> P<4/4:4/4> D<4/4:8/8>
*** B C<1/1> I<2/2:4/4:4/8:8/8> P<4/4:4/4> D<4/4:8/4>
*** B C<1/1> I<2/2:4/8:8/8:8/8> P<4/4:4/4> D<4/4:8/4>
*** l C<1/1> I<2/2:4/4:8/8:8/8> P<4/4:4/4> D<4/4:8/8>
*** B C<1/1> I<2/2:4/4:4/8:8/8> P<4/4:4/4> D<4/4:8/4>
*** B C<1/1> I<2/2:4/8:8/8:8/8> P<4/4:4/4> D<4/4:8/4>
- *** B C:1/1: I:2/2:4/4:4/4:8/8: P:4/4:4/4: D:4/4:8/4:
- ***
+ *** B C:1/1: I:2/2:4/4:4/4:8/8: P:4/4:4/4: D:4/4:8/4:
AIX
+ ***
B C:1/1: I:2/2:4/2:4/2:8/2: P:4/2:4/2: D:4/2:8/2: ARM
***/
const gras_arch_desc_t gras_arches[gras_arch_count] = {
***/
const gras_arch_desc_t gras_arches[gras_arch_count] = {
- {"little32", 0, {1,2,4,4,8, 4,4, 4,8},
// 4},
+ {"little32", 0, {1,2,4,4,8, 4,4, 4,8},
{1,2,4,4,4, 4,4, 4,4}},
{1,2,4,4,4, 4,4, 4,4}},
- {"little64", 0, {1,2,4,8,8, 8,8, 4,8},
// 8},
+ {"little64", 0, {1,2,4,8,8, 8,8, 4,8},
{1,2,4,8,8, 8,8, 4,8}},
{1,2,4,8,8, 8,8, 4,8}},
- {"big32", 1, {1,2,4,4,8, 4,4, 4,8},
// 8},
+ {"big32", 1, {1,2,4,4,8, 4,4, 4,8},
{1,2,4,4,8, 4,4, 4,8}},
{1,2,4,4,8, 4,4, 4,8}},
- {"big64", 1, {1,2,4,8,8, 8,8, 4,8},
// 8}
+ {"big64", 1, {1,2,4,8,8, 8,8, 4,8},
{1,2,4,8,8, 8,8, 4,8}},
{1,2,4,8,8, 8,8, 4,8}},
- {"aix", 1, {1,2,4,4,8, 4,4, 4,8}, // 8}
- {1,2,4,4,8, 4,4, 4,4}}
-
+ {"aix", 1, {1,2,4,4,8, 4,4, 4,8},
+ {1,2,4,4,8, 4,4, 4,4}},
+
+ {"arm", 1, {1,2,4,4,8, 4,4, 4,8},
+ {1,2,2,2,2, 2,2, 2,2}}
+
};
const char *gras_datadesc_arch_name(int code) {
};
const char *gras_datadesc_arch_name(int code) {
@@
-68,15
+71,15
@@
gras_dd_reverse_bytes(void *to,
* The data to be converted is stored in @src, and is to be stored in @dst.
* Both pointers may be the same location if no resizing is needed.
*/
* The data to be converted is stored in @src, and is to be stored in @dst.
* Both pointers may be the same location if no resizing is needed.
*/
-
gras
_error_t
-gras_dd_convert_elm(gras_datadesc_type_t
*
type, int count,
+
xbt
_error_t
+gras_dd_convert_elm(gras_datadesc_type_t type, int count,
int r_arch,
void *src, void *dst) {
gras_dd_cat_scalar_t scal = type->category.scalar_data;
int cpt;
const void *r_data;
void *l_data;
int r_arch,
void *src, void *dst) {
gras_dd_cat_scalar_t scal = type->category.scalar_data;
int cpt;
const void *r_data;
void *l_data;
-
size_t
r_size, l_size;
+
unsigned long
r_size, l_size;
/* Hexadecimal displayer
union {
char c[sizeof(int)];
/* Hexadecimal displayer
union {
char c[sizeof(int)];
@@
-84,12
+87,12
@@
gras_dd_convert_elm(gras_datadesc_type_t *type, int count,
} tester;
*/
} tester;
*/
-
gras
_assert(type->category_code == e_gras_datadesc_type_cat_scalar);
-
gras
_assert(r_arch != GRAS_THISARCH);
+
xbt
_assert(type->category_code == e_gras_datadesc_type_cat_scalar);
+
xbt
_assert(r_arch != GRAS_THISARCH);
r_size = type->size[r_arch];
l_size = type->size[GRAS_THISARCH];
r_size = type->size[r_arch];
l_size = type->size[GRAS_THISARCH];
- DEBUG4("r_size=%
d l_size=%d
, src=%p dst=%p",
+ DEBUG4("r_size=%
lu l_size=%lu
, src=%p dst=%p",
r_size,l_size,src,dst);
DEBUG2("remote=%c local=%c", gras_arches[r_arch].endian?'B':'l',
r_size,l_size,src,dst);
DEBUG2("remote=%c local=%c", gras_arches[r_arch].endian?'B':'l',
@@
-120,9
+123,9
@@
gras_dd_convert_elm(gras_datadesc_type_t *type, int count,
int lowOrderFirst = !gras_arches[r_arch].endian ||
gras_arches[r_arch].endian == gras_arches[GRAS_THISARCH].endian;
int lowOrderFirst = !gras_arches[r_arch].endian ||
gras_arches[r_arch].endian == gras_arches[GRAS_THISARCH].endian;
- DEBUG5("Resize integer %d from %
d @%p to %d
@%p",
+ DEBUG5("Resize integer %d from %
lu @%p to %lu
@%p",
cpt, r_size,r_data, l_size,l_data);
cpt, r_size,r_data, l_size,l_data);
-
gras
_assert0(r_data != l_data, "Impossible to resize in place");
+
xbt
_assert0(r_data != l_data, "Impossible to resize in place");
if(sizeChange < 0) {
DEBUG3("Truncate %d bytes (%s,%s)", -sizeChange,
if(sizeChange < 0) {
DEBUG3("Truncate %d bytes (%s,%s)", -sizeChange,