SCM Repository
View of /trunk/src/lib/diderot.h
Parent Directory
|
Revision Log
Revision 438 -
(download)
(as text)
(annotate)
Tue Oct 19 20:38:10 2010 UTC (10 years, 3 months ago) by jhr
File size: 1986 byte(s)
Tue Oct 19 20:38:10 2010 UTC (10 years, 3 months ago) by jhr
File size: 1986 byte(s)
Working on C version of runtime
/*! \file diderot.h * * \author John Reppy */ /* * COPYRIGHT (c) 2010 The Diderot Project (http://diderot-language.cs.uchicago.edu) * All rights reserved. */ #ifndef _DIDEROT_H_ #define _DIDEROT_H_ #include <stdint.h> #include <stdbool.h> /* library-call status */ typedef enum { DIDEROT_OK = 0, DIDEROT_FAIL = -1 } Status_t; /* SSE vector types */ typedef float float4 __attribute__ ((__vector_size__ (16))); typedef double double2 __attribute__ ((__vector_size__ (16))); /* union types for converting extracting vector data */ typedef union { float f[4]; float4 v; } f4union; typedef union { double d[2]; double2 v; } d2union; /* typedefs for Diderot types */ typedef int32_t Diderot_int_t; typedef float Diderot_real_t; typedef f4union Diderot_vec3_t; // padded to fit in SSE register typedef f4union Diderot_vec4_t; typedef const char *Diderot_string_t; typedef struct { // wrapper for 1D image data uint32_t dim; // dimension (== 1) uint32_t size[1]; void *data; } Diderot_image1D_t; typedef struct { // wrapper for 2D image data uint32_t dim; // dimension (== 2) uint32_t size[2]; // sizes (fast to slow) void *data; } Diderot_image2D_t; typedef struct { // wrapper for 3D image data uint32_t dim; // dimension (== 3) uint32_t size[3]; // sizes (fast to slow) void *data; } Diderot_image3D_t; /* Diderot library functions */ /* load image data from Nrrd files */ extern Status_t Diderot_LoadImage1D (Diderot_string_t name, Diderot_image1D_t *img); extern Status_t Diderot_LoadImage2D (Diderot_string_t name, Diderot_image2D_t *img); extern Status_t Diderot_LoadImage3D (Diderot_string_t name, Diderot_image3D_t *img); /* functions to load input parameters */ extern Status_t Diderot_InputString (const char *, const char **, bool); extern Status_t Diderot_InputReal (const char *, Diderot_real_t *, bool); extern Status_t Diderot_InputVec3 (const char *, Diderot_vec3_t *v); #endif /* !_DIDEROT_H_ */
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |