Classes | Macros | Functions
vnl_sse.h File Reference

Support for Streaming SIMD Extensions to speed up vector arithmetic. More...

#include <vcl_compiler_detection.h>
#include <vxl_config.h>
#include <cfloat>
#include <vnl/vnl_config.h>
#include <vnl/vnl_alloc.h>
#include "vnl/vnl_export.h"

Go to the source code of this file.

Classes

class  vnl_sse< T >
 Bog standard (no sse) implementation for non sse enabled hardware and any type which doesn't have a template specialisation. More...
 

Macros

#define VNL_SSE_FORCE_INLINE   inline
 
#define VNL_SSE_STACK_ALIGNED(x)
 
#define VNL_SSE_STACK_STORE(pf)   _mm_storeu_##pf
 
#define VNL_SSE_HEAP_STORE(pf)   _mm_storeu_##pf
 
#define VNL_SSE_HEAP_LOAD(pf)   _mm_loadu_##pf
 
#define VNL_SSE_ALLOC(n, s, a)   vnl_alloc::allocate((n == 0) ? 8 : (n * s));
 
#define VNL_SSE_FREE(v, n, s)   if (v) vnl_alloc::deallocate(v, (n == 0) ? 8 : (n * s));
 
#define VNL_SSE_FORCE_INLINE
 

Functions

VNL_SSE_FORCE_INLINE void * vnl_sse_alloc (std::size_t n, unsigned size)
 Custom memory allocation function to force 16 byte alignment of data. More...
 
VNL_SSE_FORCE_INLINE void vnl_sse_dealloc (void *mem, std::size_t n, unsigned size)
 Custom memory deallocation function to free 16 byte aligned of data. More...
 

Detailed Description

Support for Streaming SIMD Extensions to speed up vector arithmetic.

Author
Kieran O'Mahony
Date
Sep 2007
  Modifications
   2009-03-30 Peter Vanroose - Added arg_min() & arg_max() and reimplemented min() & max()

Definition in file vnl_sse.h.

Macro Definition Documentation

◆ VNL_SSE_ALLOC

#define VNL_SSE_ALLOC (   n,
  s,
 
)    vnl_alloc::allocate((n == 0) ? 8 : (n * s));

Definition at line 86 of file vnl_sse.h.

◆ VNL_SSE_FORCE_INLINE [1/2]

#define VNL_SSE_FORCE_INLINE   inline

Definition at line 121 of file vnl_sse.h.

◆ VNL_SSE_FORCE_INLINE [2/2]

#define VNL_SSE_FORCE_INLINE

Definition at line 121 of file vnl_sse.h.

◆ VNL_SSE_FREE

#define VNL_SSE_FREE (   v,
  n,
 
)    if (v) vnl_alloc::deallocate(v, (n == 0) ? 8 : (n * s));

Definition at line 87 of file vnl_sse.h.

◆ VNL_SSE_HEAP_LOAD

#define VNL_SSE_HEAP_LOAD (   pf)    _mm_loadu_##pf

Definition at line 81 of file vnl_sse.h.

◆ VNL_SSE_HEAP_STORE

#define VNL_SSE_HEAP_STORE (   pf)    _mm_storeu_##pf

Definition at line 80 of file vnl_sse.h.

◆ VNL_SSE_STACK_ALIGNED

#define VNL_SSE_STACK_ALIGNED (   x)

Definition at line 57 of file vnl_sse.h.

◆ VNL_SSE_STACK_STORE

#define VNL_SSE_STACK_STORE (   pf)    _mm_storeu_##pf

Definition at line 58 of file vnl_sse.h.

Function Documentation

◆ vnl_sse_alloc()

VNL_SSE_FORCE_INLINE void* vnl_sse_alloc ( std::size_t  n,
unsigned  size 
)

Custom memory allocation function to force 16 byte alignment of data.

Definition at line 104 of file vnl_sse.h.

◆ vnl_sse_dealloc()

VNL_SSE_FORCE_INLINE void vnl_sse_dealloc ( void *  mem,
std::size_t  n,
unsigned  size 
)

Custom memory deallocation function to free 16 byte aligned of data.

Definition at line 110 of file vnl_sse.h.