Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
port to alpha, inital try to convert, exchange/convert arrays of scalar in one shoot
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 7 Jul 2004 10:17:01 +0000 (10:17 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 7 Jul 2004 10:17:01 +0000 (10:17 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@209 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/gras/DataDesc/ddt_convert.c

index e40ae7e..10c0d86 100644 (file)
@@ -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;
 }
 
 /**