Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/lamont/src/compiler/common/strand-util.sml
ViewVC logotype

View of /branches/lamont/src/compiler/common/strand-util.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2298 - (download) (annotate)
Fri Mar 15 22:18:22 2013 UTC (6 years, 8 months ago) by jhr
File size: 1236 byte(s)
  Merging in changes from vis12 branch.
(* strand-util.sml
 *
 * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 *
 * Utility definitions for strands.
 *)

structure StrandUtil =
  struct

  (* method names *)
    datatype method_name
      = Update
      | Stabilize

    fun nameToString Update = "Update"
      | nameToString Stabilize = "Stabilize"

  (* program properties *)
    datatype program_prop
      = StrandsMayDie                   (* present if strands may die *)
      | NewStrands                      (* present if new strands may be created dynamically *)
      | StrandCommunication             (* present if strands read the state of other strands *)
      | GlobalReduce                    (* present if there is a global reduce phase *)
      | GridIs2D                        (* present if the spatial grid is 2 dimensional (3 dimensional otherwise) *) 

    fun propToString StrandsMayDie = "StrandsMayDie"
      | propToString NewStrands = "NewStrands"
      | propToString StrandCommunication = "StrandCommunication"
      | propToString GlobalReduce = "GlobalReduce"
      | propToString GridIs2D = "GridIs2D"

    fun hasProp (prop : program_prop) = List.exists (fn p => prop = p)

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0