From: mquinson Date: Wed, 7 Jul 2004 10:17:01 +0000 (+0000) Subject: port to alpha, inital try to convert, exchange/convert arrays of scalar in one shoot X-Git-Tag: v3.3~5137 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ad0e7aecfb25fcdb9296e5bf34ed96b31b515927 port to alpha, inital try to convert, exchange/convert arrays of scalar in one shoot git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@209 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/DataDesc/ddt_convert.c b/src/gras/DataDesc/ddt_convert.c index e40ae7e267..10c0d869d4 100644 --- a/src/gras/DataDesc/ddt_convert.c +++ b/src/gras/DataDesc/ddt_convert.c @@ -8,8 +8,13 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the license (GNU LGPL) which comes with this package. */ +/************************************************************************/ +/* C combines the power of assembler with the portability of assembler. */ +/************************************************************************/ + #include "DataDesc/datadesc_private.h" +GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(convert,DataDesc); /*** *** Table of all known architectures. @@ -17,6 +22,7 @@ const gras_arch_desc_t gras_arches[gras_arch_count] = { {"i386", 0, {1,2,4,4,8, 4,4, 4,8}}, + {"alpha", 0, {1,2,4,8,8, 8,8, 4.8}}, {"powerpc",1, {1,2,4,4,8, 4,4, 4,8}}, {"sparc", 1, {1,2,4,8,8, 8,8, 4,8}} }; @@ -35,14 +41,23 @@ const char *gras_datadesc_arch_name(int code) { * Both pointers may be the same location if no resizing is needed. */ gras_error_t -gras_dd_convert_elm(gras_datadesc_type_t *type, +gras_dd_convert_elm(gras_datadesc_type_t *type, int count, int r_arch, void *src, void *dst) { + // gras_dd_cat_scalar_t scal_data = type->category.scal_data; + + gras_assert(type->category_code == e_gras_datadesc_type_cat_scalar); + + if (r_arch == GRAS_THISARCH) + return no_error; + + if (gras_arches[r_arch].endian == gras_arches[GRAS_THISARCH].endian && + type->aligned_size[r_arch] == type->aligned_size[GRAS_THISARCH]) + return no_error; - if (r_arch != GRAS_THISARCH) - RAISE_UNIMPLEMENTED; + - return no_error; + RAISE_UNIMPLEMENTED; } /**