| 
    milk
    1.01
    
   Modular Image processing Library toolKit 
   | 
 
 
 
 
Go to the documentation of this file.
   18 #ifndef _IMAGESTRUCT_H 
   19 #define _IMAGESTRUCT_H 
   21 #define IMAGESTRUCT_VERSION "1.01" 
   23 #define STRINGMAXLEN_IMAGE_NAME          80 
   24 #define KEYWORD_MAX_STRING  16             
   25 #define KEYWORD_MAX_COMMENT 80             
   30 #include <semaphore.h> 
   34 #include <sys/types.h> 
   40 #include <cuda_runtime_api.h> 
   45 typedef char cudaIpcMemHandle_t[64];
 
   48 #include "ImageStreamIOError.h" 
   51 #include <mach/mach_time.h> 
   52 #define CLOCK_REALTIME 0 
   53 #define CLOCK_MONOTONIC 0 
   54 static int clock_gettime(
int clk_id, 
struct mach_timespec *t) {
 
   55     mach_timebase_info_data_t timebase;
 
   56     mach_timebase_info(&timebase);
 
   58     time = mach_absolute_time();
 
   60         ((double)time * (
double)timebase.numer) / ((
double)timebase.denom);
 
   62         ((double)time * (
double)timebase.numer) / ((
double)timebase.denom * 1e9);
 
   64     t->tv_nsec = nseconds;
 
   79 #define SHAREDMEMDIR    "/milk/shm"           
   81 #define SEMAPHORE_MAXVAL    10             
   82 #define SEMAPHORE_INITVAL    0             
   83 #define IMAGE_NB_SEMAPHORE  10             
   85 #define IMAGE_NB_PROCTRACE  10             
   87 // Data types are defined as machine-independent types for portability 
   89 #define _DATATYPE_UINT8                                1   
   90 #define SIZEOF_DATATYPE_UINT8                          1 
   92 #define _DATATYPE_INT8                                 2   
   93 #define SIZEOF_DATATYPE_INT8                           1 
   95 #define _DATATYPE_UINT16                               3   
   96 #define SIZEOF_DATATYPE_UINT16                         2 
   98 #define _DATATYPE_INT16                                4   
   99 #define SIZEOF_DATATYPE_INT16                          2 
  101 #define _DATATYPE_UINT32                               5   
  102 #define SIZEOF_DATATYPE_UINT32                         4 
  104 #define _DATATYPE_INT32                                6   
  105 #define SIZEOF_DATATYPE_INT32                          4 
  107 #define _DATATYPE_UINT64                               7   
  108 #define SIZEOF_DATATYPE_UINT64                         8 
  110 #define _DATATYPE_INT64                                8   
  111 #define SIZEOF_DATATYPE_INT64                          8 
  113 #define _DATATYPE_HALF                                13   
  114 #define SIZEOF_DATATYPE_HALF                           2 
  116 #define _DATATYPE_FLOAT                                9   
  117 #define SIZEOF_DATATYPE_FLOAT                          4 
  119 #define _DATATYPE_DOUBLE                              10  
  120 #define SIZEOF_DATATYPE_DOUBLE                         8 
  122 #define _DATATYPE_COMPLEX_FLOAT                       11   
  123 #define SIZEOF_DATATYPE_COMPLEX_FLOAT                  8 
  125 #define _DATATYPE_COMPLEX_DOUBLE                      12   
  126 #define SIZEOF_DATATYPE_COMPLEX_DOUBLE                16 
  128 #define _DATATYPE_EVENT_UI8_UI8_UI16_UI8              20 
  129 #define SIZEOF_DATATYPE_EVENT_UI8_UI8_UI16_UI8         5 
  136 #define CIRCULAR_BUFFER  0x0001   
  137 #define MATH_DATA        0x0002   
  138 #define IMG_RECV         0x0004   
  139 #define IMG_SENT         0x0008   
  143 #define ZAXIS_UNDEF      0x00000   
  144 #define ZAXIS_SPACIAL    0x10000   
  145 #define ZAXIS_TEMPORAL   0x20000   
  146 #define ZAXIS_WAVELENGTH 0x30000   
  147 #define ZAXIS_MAPPING    0x40000   
  212     char name[STRINGMAXLEN_IMAGE_NAME];
 
  291     struct timespec creationtime;
 
  292     struct timespec lastaccesstime;
 
  294     struct timespec atime;             
 
  295     struct timespec writetime;         
 
  328     cudaIpcMemHandle_t cudaMemHandle;
 
  350     struct timespec ts_procstart;         
 
  351     struct timespec ts_streamupdate;      
 
  368     char name[STRINGMAXLEN_IMAGE_NAME];     
 
  
 
uint8_t used
Image usage flag.
Definition: ImageStruct.h:378
 
Definition: ImageStruct.h:182
 
#define KEYWORD_MAX_COMMENT
Definition: ImageStruct.h:25
 
struct timespec * atimearray
Definition: ImageStruct.h:449
 
IMAGE structure The IMAGE structure includes :
Definition: ImageStruct.h:366
 
structure holding two 8-byte integers
Definition: ImageStruct.h:177
 
uint64_t memsize
Definition: ImageStruct.h:382
 
char type
Definition: ImageStruct.h:157
 
STREAM_PROC_TRACE holds trigger and timing info.
Definition: ImageStruct.h:345
 
sem_t ** semptr
Definition: ImageStruct.h:429
 
Definition: ImageStruct.h:187
 
uint64_t * cntarray
Definition: ImageStruct.h:448
 
int32_t shmfd
Definition: ImageStruct.h:380
 
sem_t * semlog
Definition: ImageStruct.h:384
 
#define KEYWORD_MAX_STRING
Definition: ImageStruct.h:24
 
Keyword The IMAGE_KEYWORD structure includes :
Definition: ImageStruct.h:155
 
uint64_t cnt0
Definition: ImageStruct.h:354
 
errno_t __attribute__((hot))
Logs a shared memory stream onto disk.
Definition: logshmim.c:685
 
uint64_t * flagarray
Definition: ImageStruct.h:447
 
ino_t trigger_inode
Definition: ImageStruct.h:349
 
struct timespec * writetimearray
Definition: ImageStruct.h:450
 
int trigsemindex
Definition: ImageStruct.h:352
 
pid_t procwrite_PID
Definition: ImageStruct.h:348