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

SCM Repository

[diderot] View of /branches/vis12-cl/test/iso2d-polyline/main.c
ViewVC logotype

View of /branches/vis12-cl/test/iso2d-polyline/main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2402 - (download) (as text) (annotate)
Sat Jul 27 13:55:03 2013 UTC (6 years, 1 month ago) by jhr
File size: 884 byte(s)
  Create branch for adding OpenCL to vis12 branch.  Based on r2401 of the vis12 branch.
/*! \file main.c
 *
 * \author John Reppy
 */

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

#include "iso2d-polyline.h"

int main (int argc, const char **argv)
{
    ISO_World_t *wrld = ISO_Init ();

    ISO_SetVerbose (wrld, true);

    ISO_Initially (wrld);

    uint32_t nSteps = ISO_Run (wrld, 0);

  // get results
    Nrrd *nLengths = nrrdNew();
    Nrrd *nData = nrrdNew();
    if (ISO_OutputGet_path (wrld, nLengths, nData)) {
      // error
	//fprintf(stderr, "Error getting nrrd data: %s\n", ((WorldPrefix_t *)wrld)->err);
	return 1;
    }

    if (nrrdSave("lengths.nrrd", nLengths, NULL) || nrrdSave("data.nrrd", nData, NULL)) {
        char *err = biffGetDone(NRRD);
        fprintf(stderr, "Trouble saving nrrd struct: %s\n", err);
        return 1;
    }

    ISO_Shutdown (wrld);

    return 0;
}

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