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

SCM Repository

[diderot] View of /branches/pure-cfg/src/include/Diderot/cl-types.h
ViewVC logotype

View of /branches/pure-cfg/src/include/Diderot/cl-types.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1272 - (download) (as text) (annotate)
Mon Jun 6 09:19:11 2011 UTC (8 years, 3 months ago) by jhr
File size: 2468 byte(s)
  Change filename and remove unnecessary definitions
/*! \file cl-types.h
 *
 * \author Lamont Samuels
 */

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

#ifndef _DIDEROT_CL_TYPES_H_
#define _DIDEROT_CL_TYPES_H_
 
typedef enum {
    DIDEROT_ACTIVE = 0,		//!< a currently running strand
    DIDEROT_NEW = 1,		//!< a newly created, but not yet active, strand
    DIDEROT_DIE,		//!< a dead strand
    DIDEROT_STABILIZE,		//!< a strand that will be stable at the end of
                                //!< the current step
    DIDEROT_STABLE		//!< a stable strand
} StrandStatus_t;

/* OpenCL version 1.00 does not support 3-element vectors */
#if __OPENCL_VERSION__ < 110
typedef int4 int3;
typedef float4 float3;
#endif

#if defined(DIDEROT_SINGLE_PRECISION)
typedef int Diderot_int_t;
typedef float Diderot_real_t;
typedef float2 Diderot_vec2_t;
typedef float3 Diderot_vec3_t;
typedef float4 Diderot_vec4_t;
#else
# error double precision not yet supported
#endif

typedef Diderot_vec2_t Diderot_Mat2x2_t[2];	// represented as row vectors
typedef Diderot_vec3_t Diderot_Mat3x3_t[3];	// represented as row vectors
typedef Diderot_vec4_t Diderot_Mat4x4_t[4];     // represented as row vectors


typedef struct {			// wrapper for 1D image data
    uint		dim;		// dimension (== 1)
    uint		size[1];
    void		*data;
    Diderot_real_t	s;		// scaling from world-space to image-space
    Diderot_real_t	t;		// translation from world-space to image-space
} Diderot_image1D_t;

typedef struct {			// wrapper for 2D image data
    uint		dim;		// dimension (== 2)
    uint		size[2];	// sizes (fast to slow)
    void		*data;
    Diderot_Mat2x2_t	w2i;		// affine tranform from world space to index space.  This is the
    // inverse of the index to world-space transform that is loaded from
    // the Nrrd file.
    Diderot_vec2_t	tVec;		// translation part of world to index transform
    Diderot_Mat2x2_t	w2iT;		// transpose w3i
} Diderot_image2D_t;

typedef struct {			// wrapper for 3D image data
    uint		dim;		// dimension (== 3)
    uint		size[3];	// sizes (fast to slow)
    void		*data;
    Diderot_Mat3x3_t	w2i;		// affine tranform from world space to index space.  This is the
    // inverse of the index to world-space transform that is loaded from
    // the Nrrd file.
    Diderot_vec3_t	tVec;		// translation part of world to index transform
    Diderot_Mat3x3_t	w2iT;		// transpose w3i
} Diderot_image3D_t;

#endif /* !_DIDEROT_CL_TYPES_H_ */
 

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