18 #ifndef _IMAGESTRUCT_H 19 #define _IMAGESTRUCT_H 21 #define IMAGESTRUCT_VERSION "0.0.01" 23 #include <semaphore.h> 27 #include <sys/types.h> 33 #include <cuda_runtime_api.h> 44 #include <mach/mach_time.h> 45 #define CLOCK_REALTIME 0 46 #define CLOCK_MONOTONIC 0 47 static int clock_gettime(
int clk_id,
struct mach_timespec *t) {
48 mach_timebase_info_data_t timebase;
49 mach_timebase_info(&timebase);
51 time = mach_absolute_time();
53 ((double)time * (
double)timebase.numer) / ((
double)timebase.denom);
55 ((double)time * (
double)timebase.numer) / ((
double)timebase.denom * 1e9);
57 t->tv_nsec = nseconds;
72 #define SHAREDMEMDIR "/milk/shm" 74 #define SEMAPHORE_MAXVAL 10 75 #define SEMAPHORE_INITVAL 0 76 #define IMAGE_NB_SEMAPHORE 10 78 // Data types are defined as machine-independent types for portability 80 #define _DATATYPE_UINT8 1 81 #define SIZEOF_DATATYPE_UINT8 1 83 #define _DATATYPE_INT8 2 84 #define SIZEOF_DATATYPE_INT8 1 86 #define _DATATYPE_UINT16 3 87 #define SIZEOF_DATATYPE_UINT16 2 89 #define _DATATYPE_INT16 4 90 #define SIZEOF_DATATYPE_INT16 2 92 #define _DATATYPE_UINT32 5 93 #define SIZEOF_DATATYPE_UINT32 4 95 #define _DATATYPE_INT32 6 96 #define SIZEOF_DATATYPE_INT32 4 98 #define _DATATYPE_UINT64 7 99 #define SIZEOF_DATATYPE_UINT64 8 101 #define _DATATYPE_INT64 8 102 #define SIZEOF_DATATYPE_INT64 8 104 #define _DATATYPE_HALF 13 105 #define SIZEOF_DATATYPE_HALF 2 107 #define _DATATYPE_FLOAT 9 108 #define SIZEOF_DATATYPE_FLOAT 4 110 #define _DATATYPE_DOUBLE 10 111 #define SIZEOF_DATATYPE_DOUBLE 8 113 #define _DATATYPE_COMPLEX_FLOAT 11 114 #define SIZEOF_DATATYPE_COMPLEX_FLOAT 8 116 #define _DATATYPE_COMPLEX_DOUBLE 12 117 #define SIZEOF_DATATYPE_COMPLEX_DOUBLE 16 119 #define _DATATYPE_EVENT_UI8_UI8_UI16_UI8 20 120 #define SIZEOF_DATATYPE_EVENT_UI8_UI8_UI16_UI8 5 127 #define CIRCULAR_BUFFER 0x0001 128 #define MATH_DATA 0x0002 129 #define IMG_RECV 0x0004 130 #define IMG_SENT 0x0008 134 #define ZAXIS_UNDEF 0x00000 135 #define ZAXIS_SPACIAL 0x10000 136 #define ZAXIS_TEMPORAL 0x20000 137 #define ZAXIS_WAVELENGTH 0x30000 138 #define ZAXIS_MAPPING 0x40000 282 struct timespec creationtime;
283 struct timespec lastaccesstime;
285 struct timespec atime;
286 struct timespec writetime;
int8_t * SI8
Definition: ImageStruct.h:372
int64_t firstlong
Definition: ImageStruct.h:169
int32_t * SI32
Definition: ImageStruct.h:378
int16_t * SI16
Definition: ImageStruct.h:375
double * D
Definition: ImageStruct.h:384
int64_t numl
Definition: ImageStruct.h:152
IMAGE structure The IMAGE structure includes :
Definition: ImageStruct.h:330
structure holding two 8-byte integers
Definition: ImageStruct.h:168
sem_t ** semptr
Definition: ImageStruct.h:392
float im
Definition: ImageStruct.h:175
void * raw
Definition: ImageStruct.h:369
IMAGE_KEYWORD * kw
Definition: ImageStruct.h:394
uint64_t * UI64
Definition: ImageStruct.h:380
Keyword The IMAGE_KEYWORD structure includes :
Definition: ImageStruct.h:146
Definition: ImageStruct.h:178
void __attribute__((constructor)) libinit_00CORE()
Definition: ImageStreamIO.c:77
float re
Definition: ImageStruct.h:174
int32_t shmfd
Definition: ImageStruct.h:345
complex_float * CF
Definition: ImageStruct.h:386
int64_t * SI64
Definition: ImageStruct.h:381
struct timespec * writetimearray
Definition: ImageStruct.h:407
double im
Definition: ImageStruct.h:180
pid_t * semReadPID
Definition: ImageStruct.h:399
struct timespec * atimearray
Definition: ImageStruct.h:406
pid_t * semWritePID
Definition: ImageStruct.h:402
double re
Definition: ImageStruct.h:179
double numf
Definition: ImageStruct.h:153
IMAGE_METADATA * md
Definition: ImageStruct.h:351
uint8_t * UI8
Definition: ImageStruct.h:371
uint64_t memsize
Definition: ImageStruct.h:347
uint32_t * UI32
Definition: ImageStruct.h:377
sem_t * semlog
Definition: ImageStruct.h:349
uint16_t * UI16
Definition: ImageStruct.h:374
uint64_t * flagarray
Definition: ImageStruct.h:404
char type
Definition: ImageStruct.h:148
float * F
Definition: ImageStruct.h:383
uint64_t * cntarray
Definition: ImageStruct.h:405
uint8_t used
Image usage flag.
Definition: ImageStruct.h:343
Definition: ImageStruct.h:173
char cudaIpcMemHandle_t[64]
Definition: ImageStruct.h:38
complex_double * CD
Definition: ImageStruct.h:387
int64_t secondlong
Definition: ImageStruct.h:170