cacao  Release 0.1.03-dev
Compute And Control For Adaptive Optics
ImageStruct.h File Reference

Image structure definition. More...

#include <semaphore.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
#include "ImageStreamIOError.h"
Include dependency graph for ImageStruct.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  IMAGE_KEYWORD
 Keyword The IMAGE_KEYWORD structure includes : More...
 
struct  TIMESPECFIXED
 structure holding two 8-byte integers More...
 
struct  complex_float
 
struct  complex_double
 
struct  IMAGE_METADATA
 Image metadata. More...
 
struct  IMAGE
 IMAGE structure The IMAGE structure includes : More...
 

Macros

#define IMAGESTRUCT_VERSION   "0.0.01"
 
#define SHAREDMEMDIR   "/milk/shm"
 
#define SEMAPHORE_MAXVAL   10
 
#define SEMAPHORE_INITVAL   0
 
#define IMAGE_NB_SEMAPHORE   10
 
#define _DATATYPE_UINT8   1
 
#define SIZEOF_DATATYPE_UINT8   1
 
#define _DATATYPE_INT8   2
 
#define SIZEOF_DATATYPE_INT8   1
 
#define _DATATYPE_UINT16   3
 
#define SIZEOF_DATATYPE_UINT16   2
 
#define _DATATYPE_INT16   4
 
#define SIZEOF_DATATYPE_INT16   2
 
#define _DATATYPE_UINT32   5
 
#define SIZEOF_DATATYPE_UINT32   4
 
#define _DATATYPE_INT32   6
 
#define SIZEOF_DATATYPE_INT32   4
 
#define _DATATYPE_UINT64   7
 
#define SIZEOF_DATATYPE_UINT64   8
 
#define _DATATYPE_INT64   8
 
#define SIZEOF_DATATYPE_INT64   8
 
#define _DATATYPE_HALF   13
 
#define SIZEOF_DATATYPE_HALF   2
 
#define _DATATYPE_FLOAT   9
 
#define SIZEOF_DATATYPE_FLOAT   4
 
#define _DATATYPE_DOUBLE   10
 
#define SIZEOF_DATATYPE_DOUBLE   8
 
#define _DATATYPE_COMPLEX_FLOAT   11
 
#define SIZEOF_DATATYPE_COMPLEX_FLOAT   8
 
#define _DATATYPE_COMPLEX_DOUBLE   12
 
#define SIZEOF_DATATYPE_COMPLEX_DOUBLE   16
 
#define _DATATYPE_EVENT_UI8_UI8_UI16_UI8   20
 
#define SIZEOF_DATATYPE_EVENT_UI8_UI8_UI16_UI8   5
 
#define Dtype   9
 
#define CDtype   11
 
#define CIRCULAR_BUFFER   0x0001
 
#define MATH_DATA   0x0002
 
#define IMG_RECV   0x0004
 
#define IMG_SENT   0x0008
 
#define ZAXIS_UNDEF   0x00000
 
#define ZAXIS_SPACIAL   0x10000
 
#define ZAXIS_TEMPORAL   0x20000
 
#define ZAXIS_WAVELENGTH   0x30000
 
#define ZAXIS_MAPPING   0x40000
 

Typedefs

typedef char cudaIpcMemHandle_t[64]
 

Detailed Description

Image structure definition.

The IMAGE structure is defined here Supports shared memory, low latency IPC through semaphores

Dynamic allocation within IMAGE: IMAGE includes a pointer to an array of IMAGE_METADATA (usually only one element, >1 element for polymorphism) IMAGE includes a pointer to an array of KEYWORDS IMAGE includes a pointer to a data array

Bug:
No known bugs.

Macro Definition Documentation

◆ _DATATYPE_COMPLEX_DOUBLE

#define _DATATYPE_COMPLEX_DOUBLE   12

complex double

◆ _DATATYPE_COMPLEX_FLOAT

#define _DATATYPE_COMPLEX_FLOAT   11

◆ _DATATYPE_DOUBLE

#define _DATATYPE_DOUBLE   10

IEEE 754 double-precision binary floating-point format: binary64

◆ _DATATYPE_EVENT_UI8_UI8_UI16_UI8

#define _DATATYPE_EVENT_UI8_UI8_UI16_UI8   20

◆ _DATATYPE_FLOAT

#define _DATATYPE_FLOAT   9

IEEE 754 single-precision binary floating-point format: binary32

◆ _DATATYPE_HALF

#define _DATATYPE_HALF   13

IEE 754 half-precision 16-bit (uses uint16_t for storage)

◆ _DATATYPE_INT16

#define _DATATYPE_INT16   4

int16_t usually = short int

◆ _DATATYPE_INT32

#define _DATATYPE_INT32   6

int32_t usually = int

◆ _DATATYPE_INT64

#define _DATATYPE_INT64   8

int64_t usually = long

◆ _DATATYPE_INT8

#define _DATATYPE_INT8   2

int8_t

◆ _DATATYPE_UINT16

#define _DATATYPE_UINT16   3

uint16_t usually = unsigned short int

◆ _DATATYPE_UINT32

#define _DATATYPE_UINT32   5

uint32_t usually = unsigned int

◆ _DATATYPE_UINT64

#define _DATATYPE_UINT64   7

uint64_t usually = unsigned long

◆ _DATATYPE_UINT8

#define _DATATYPE_UINT8   1

uint8_t = char

◆ CDtype

#define CDtype   11

default data type for complex

◆ CIRCULAR_BUFFER

#define CIRCULAR_BUFFER   0x0001

Circular buffer, slice z axis is encoding time -> record writetime array

◆ Dtype

#define Dtype   9

default data type for floating point

◆ IMAGE_NB_SEMAPHORE

#define IMAGE_NB_SEMAPHORE   10

Number of semaphores per image

◆ IMAGESTRUCT_VERSION

#define IMAGESTRUCT_VERSION   "0.0.01"

◆ IMG_RECV

#define IMG_RECV   0x0004

Image is stream received from another computer

◆ IMG_SENT

#define IMG_SENT   0x0008

Image is stream sent to other computer

◆ MATH_DATA

#define MATH_DATA   0x0002

Image is mathematical vector or matrix

◆ SEMAPHORE_INITVAL

#define SEMAPHORE_INITVAL   0

maximum value for each of the semaphore, mitigates warm-up time when processes catch up with data that has accumulated

◆ SEMAPHORE_MAXVAL

#define SEMAPHORE_MAXVAL   10

maximum value for each of the semaphore, mitigates warm-up time when processes catch up with data that has accumulated

◆ SHAREDMEMDIR

#define SHAREDMEMDIR   "/milk/shm"

default location of file mapped semaphores, can be over-ridden by env variable MILK_SHM_DIR

◆ SIZEOF_DATATYPE_COMPLEX_DOUBLE

#define SIZEOF_DATATYPE_COMPLEX_DOUBLE   16

◆ SIZEOF_DATATYPE_COMPLEX_FLOAT

#define SIZEOF_DATATYPE_COMPLEX_FLOAT   8

◆ SIZEOF_DATATYPE_DOUBLE

#define SIZEOF_DATATYPE_DOUBLE   8

◆ SIZEOF_DATATYPE_EVENT_UI8_UI8_UI16_UI8

#define SIZEOF_DATATYPE_EVENT_UI8_UI8_UI16_UI8   5

◆ SIZEOF_DATATYPE_FLOAT

#define SIZEOF_DATATYPE_FLOAT   4

◆ SIZEOF_DATATYPE_HALF

#define SIZEOF_DATATYPE_HALF   2

◆ SIZEOF_DATATYPE_INT16

#define SIZEOF_DATATYPE_INT16   2

◆ SIZEOF_DATATYPE_INT32

#define SIZEOF_DATATYPE_INT32   4

◆ SIZEOF_DATATYPE_INT64

#define SIZEOF_DATATYPE_INT64   8

◆ SIZEOF_DATATYPE_INT8

#define SIZEOF_DATATYPE_INT8   1

◆ SIZEOF_DATATYPE_UINT16

#define SIZEOF_DATATYPE_UINT16   2

◆ SIZEOF_DATATYPE_UINT32

#define SIZEOF_DATATYPE_UINT32   4

◆ SIZEOF_DATATYPE_UINT64

#define SIZEOF_DATATYPE_UINT64   8

◆ SIZEOF_DATATYPE_UINT8

#define SIZEOF_DATATYPE_UINT8   1

◆ ZAXIS_MAPPING

#define ZAXIS_MAPPING   0x40000

mapping index

◆ ZAXIS_SPACIAL

#define ZAXIS_SPACIAL   0x10000

spatial coordinate

◆ ZAXIS_TEMPORAL

#define ZAXIS_TEMPORAL   0x20000

temporal coordinate

◆ ZAXIS_UNDEF

#define ZAXIS_UNDEF   0x00000

undefined (default)

◆ ZAXIS_WAVELENGTH

#define ZAXIS_WAVELENGTH   0x30000

wavelength coordinate

Typedef Documentation

◆ cudaIpcMemHandle_t

typedef char cudaIpcMemHandle_t[64]