Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Speedup arch signature detection code; add sparc signature
[simgrid.git] / src / gras / DataDesc / ddt_convert.c
index 877d34f..f456e25 100644 (file)
  *** Table of all known architectures. 
  ***/
 
-const gras_arch_sizes_t gras_arch_sizes[gras_arch_count] = {
-  {"i386",   0,   {1,2,4,4,8,   4,4,   4,8}}
+const gras_arch_desc_t gras_arches[gras_arch_count] = {
+  {"i386",   0,   {1,2,4,4,8,   4,4,   4,8}},
+  {"ppc",    1,   {1,2,4,4,8,   4,4,   4,8}},
+  {"sparc",  1,   {1,2,4,8,8,   8,8,   4,8}}
 };
 
+const char *gras_datadesc_arch_name(int code) {
+   if (code < 0 || code > gras_arch_count)
+     return "[arch code out of bound]";
+   return gras_arches[code].name;
+}
 
 /**
  * gras_dd_convert_elm: