mdcore  0.1.5
Defines | Functions | Variables
/home/pedro/work/mdcore/src/fptype.h File Reference

Go to the source code of this file.

Defines

#define vector(elcount, type)   __attribute__((vector_size((elcount)*sizeof(type)))) type

Functions

 __attribute__ ((always_inline)) INLINE FPTYPE fptype_r2(FPTYPE *x1
 Inlined function to compute the distance^2 between two vectors.

Variables

FPTYPE * x2
FPTYPE FPTYPE *dx dx [0] = x1[0] - x2[0]

Define Documentation

#define vector (   elcount,
  type 
)    __attribute__((vector_size((elcount)*sizeof(type)))) type

Macro to easily define vector types.


Function Documentation

__attribute__ ( (always_inline)  )

Inlined function to compute the distance^2 between two vectors.

Parameters:
x1The first vector.
x2The second vector.
dxAn array in which x1 - x2 will be stored.
Returns:
The Euclidian distance squared between x1 and x2.

Depending on the processor features, this function will use SSE registers and horizontal adds.


Variable Documentation

return dx* [0] dx [0] dx* [1] dx [1] dx* [2] dx[2] = x1[0] - x2[0]
FPTYPE* x2
 All Data Structures Files Functions Variables Typedefs Enumerator Defines