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

SCM Repository

[diderot] View of /branches/lamont/test/reduction/reduction-test.diderot
ViewVC logotype

View of /branches/lamont/test/reduction/reduction-test.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2097 - (download) (annotate)
Mon Nov 26 02:47:14 2012 UTC (7 years, 6 months ago) by lamonts
File size: 559 byte(s)
adding reduction test case
/*! \file reduction-test.diderot
 *
 * \author Lamont Samuels
 *
 * This example tests the global reductions operations. 
 */

/*
 * COPYRIGHT (c) 2012 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 */

int{} args = load("energies.nrrd");
int nArgs = length(args);

strand Particle (real initEnergy) {
    real energy = initEnergy; 
    output real maxEnergy = 0.0;  

    update {
         maxEnergy = max{P.energy | P in {Particle.active && Particle.stable}};
    }
}

initially [ Particle(vi) | vi in 0..(nArgs-1)]; 

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