starpu_smpi.xslt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!--
  2. StarPU : Runtime system for heterogeneous multicore architectures.
  3. Copyright (C) 2014-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. StarPU is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 2.1 of the License, or (at
  7. your option) any later version.
  8. StarPU is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. See the GNU Lesser General Public License in COPYING.LGPL for more details.
  12. -->
  13. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  14. <xsl:output doctype-system="http://simgrid.gforge.inria.fr/simgrid.dtd"/>
  15. <!-- Add doctype
  16. <xsl:text>&lt;!DOCTYPE platform SYSTEM 'http://simgrid.gforge.inria.fr/simgrid.dtd'&gt;</xsl:text>
  17. -->
  18. <!-- Copy everything by default but keep applying templates. -->
  19. <xsl:template match="platform|AS|host|link|prop|route|link_ctn|@*">
  20. <xsl:copy>
  21. <xsl:apply-templates select="node()|@*"/>
  22. </xsl:copy>
  23. </xsl:template>
  24. <!-- Replace AS name. -->
  25. <xsl:template match="platform/AS/@id">
  26. <xsl:attribute name="id">
  27. <xsl:value-of select="$ASname"/>
  28. </xsl:attribute>
  29. </xsl:template>
  30. <!-- Prepend AS name to host names. -->
  31. <xsl:template match="platform/AS/host/@id">
  32. <xsl:attribute name="id"><xsl:value-of select="$ASname"/>-<xsl:value-of select="."/></xsl:attribute>
  33. </xsl:template>
  34. <xsl:template match="platform/AS/link/@id">
  35. <xsl:attribute name="id"><xsl:value-of select="$ASname"/>-<xsl:value-of select="."/></xsl:attribute>
  36. </xsl:template>
  37. <xsl:template match="platform/AS/route/@src">
  38. <xsl:attribute name="src"><xsl:value-of select="$ASname"/>-<xsl:value-of select="."/></xsl:attribute>
  39. </xsl:template>
  40. <xsl:template match="platform/AS/route/@dst">
  41. <xsl:attribute name="dst"><xsl:value-of select="$ASname"/>-<xsl:value-of select="."/></xsl:attribute>
  42. </xsl:template>
  43. <xsl:template match="platform/AS/route/link_ctn/@id">
  44. <xsl:attribute name="id"><xsl:value-of select="$ASname"/>-<xsl:value-of select="."/></xsl:attribute>
  45. </xsl:template>
  46. </xsl:stylesheet>