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

SCM Repository

[diderot] View of /branches/vis15/src/lib/include/diderot/base.hxx
ViewVC logotype

View of /branches/vis15/src/lib/include/diderot/base.hxx

Parent Directory Parent Directory | Revision Log Revision Log

Revision 4637 - (download) (as text) (annotate)
Tue Sep 27 02:11:43 2016 UTC (2 years, 11 months ago) by jhr
File size: 1906 byte(s)
  working on merge: add SIMD flags to C++ compiles
/*! \file base.hxx
 * \author John Reppy

 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 * COPYRIGHT (c) 2016 The University of Chicago
 * All rights reserved.


#include "config.h"

// teem headers
#include <teem/air.h>
#include <teem/biff.h>
#include <teem/nrrd.h>

// C library headers
#include <cmath>
#include <cstring>
#include <cassert>

// C++ std library headers
#include <string>
#include <fstream>
#include <ostream>
#include <iostream>
#include <array>

namespace diderot {

    enum strand_status {
        kActive = 0,            //!< a currently running strand
        kNew = 1,               //!< a newly created, but not yet active, strand
        kDie,                   //!< a dying strand
        kDead,                  //!< a dead strand
        kStabilize,             //!< a strand that will be stable at the end of
                                //!< the current step
        kStable                 //!< a stable strand

  // standard vector types
    template <typename REAL> using real2 = REAL[2];
    template <typename REAL> using real3 = REAL[3];

  // standard matrix types
    template <typename REAL> using mat2x2 = REAL[4];
    template <typename REAL> using mat3x3 = REAL[9];
    template <typename REAL> using mat4x4 = REAL[16];

    namespace __details {

        struct nrrd_type_info {
            bool isFloat;
            unsigned int sizeb;
            const char *name;

        extern struct nrrd_type_info nrrd_type_info[nrrdTypeLast];

    } // namespace __details

} // namespace diderot

// cach-line size (default Xeon has 64-byte lines)
#define CACHE_LINE_SIZE         64

// cache-line alignment
#define CACHE_ALIGN     __attribute__((aligned(CACHE_LINE_SIZE)))

#endif // !_DIDEROT_BASE_HXX_

ViewVC Help
Powered by ViewVC 1.0.0