parExQHV
Compute Exclusive HyperVolumes using threads
 All Data Structures Files Functions Variables Macros
point.h File Reference

Simple point interface. Contains simple point manipulation functions. More...

#include <stdio.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include "emmintrin.h"
#include "macros.h"
#include "pointStruct.h"
Include dependency graph for point.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define Eps   0.0000000001
 
#define equal(A, B, I)   (fabs((A)->x[I] - (B)->x[I]) < Eps)
 
#define objective(Z, A, O)   HV(Z, A)
 
#define SSED   ((D+1)/2)
 Used to guarantee aligned points.
 

Functions

void parsePoint (char *S, point *p, double max)
 
void randomPoint (point *p)
 
 while (i< D)
 
 memcpy (z,&(zero->x[0]), SSED *sizeof(__m128d))
 
 memcpy (o,&(one->x[0]), SSED *sizeof(__m128d))
 
 memcpy (p,&(pt->x[0]), SSED *sizeof(__m128d))
 
 if (V[1]< V[0]) V[0]
 
 memcpy (a,&(A->x[0]), SSED *sizeof(__m128d))
 
 memcpy (b,&(B->x[0]), SSED *sizeof(__m128d))
 
memcpy SSEDsizeof (__m128d))
 

Variables

point cZero
 
point cOne
 
static pointpvt
 
static point unsigned int oct
 
static point unsigned int pointzero
 
int i = 0
 
 B = 1
 
static point unsigned int pointone
 
static pointa
 
 res = 0
 
__m128d o [SSED]
 
__m128d z [SSED]
 
double * V = (double*) &c
 A volume value for every dimension + 1.
 
int d = 0
 
 c = _mm_set1_pd(1)
 
static pointpt
 
__m128d s
 
__m128d p [SSED]
 
static pointA
 
__m128d b [SSED]
 
__m128d r [SSED]
 
static int n
 
static int int j
 
 t = idx[n]
 
 idx [n] = idx[j]
 

Detailed Description

Simple point interface. Contains simple point manipulation functions.

Author
Luis Russo <lsr-ThinkPad-X201>
Date
Mon Nov 28 14:39:12 2011

Definition in file point.h.

Macro Definition Documentation

#define equal (   A,
  B,
 
)    (fabs((A)->x[I] - (B)->x[I]) < Eps)
Parameters
AFirst point
BSecond point
icoordinate to compare
Returns
True if the i coordinates are almost equal

Definition at line 75 of file point.h.

#define objective (   Z,
  A,
 
)    HV(Z, A)
Parameters
ZThe zero bounding point
AThe point to analyze
OThe one bounding point
Returns
The objective value to maximize, must be > 0

Definition at line 84 of file point.h.

Function Documentation

void parsePoint ( char *  S,
point p,
double  max 
)

Reads a point from the '\0' terminated string.

Parameters
SThe string containing the coordinates, separated by spaces or '
'
pThe position where to store the point

Definition at line 57 of file point.c.

void randomPoint ( point p)

Sets p to a random point in [0,1]

Parameters
pThe point to alter

Definition at line 74 of file point.c.

Variable Documentation

point* a
Initial value:
{
unsigned int res

Definition at line 147 of file point.h.

point cOne

The all 1's point

Definition at line 45 of file point.c.

point cZero

The origin point

Definition at line 44 of file point.c.

int int j
Initial value:
{
int t

Definition at line 319 of file point.h.

static point point * one
Initial value:
{
unsigned int B

Definition at line 122 of file point.h.

point unsigned int point* zero
Initial value:
{
unsigned int B

Definition at line 103 of file point.h.