Rcpp Version 0.12.12
unroll.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RCPP_LOOP_UNROLL_PTR(TARGET, SOURCE)
 
#define RCPP_LOOP_UNROLL(TARGET, SOURCE)
 
#define RCPP_LOOP_UNROLL_LHSFUN(TARGET, FUN, SOURCE)
 

Macro Definition Documentation

#define RCPP_LOOP_UNROLL (   TARGET,
  SOURCE 
)
Value:
R_xlen_t __trip_count = n >> 2 ; \
R_xlen_t i = 0 ; \
for ( ; __trip_count > 0 ; --__trip_count) { \
TARGET[i] = SOURCE[i] ; i++ ; \
TARGET[i] = SOURCE[i] ; i++ ; \
TARGET[i] = SOURCE[i] ; i++ ; \
TARGET[i] = SOURCE[i] ; i++ ; \
} \
switch (n - i){ \
case 3: \
TARGET[i] = SOURCE[i] ; i++ ; \
case 2: \
TARGET[i] = SOURCE[i] ; i++ ; \
case 1: \
TARGET[i] = SOURCE[i] ; i++ ; \
case 0: \
default: \
{} \
}

Definition at line 47 of file unroll.h.

Referenced by Rcpp::Vector< INTSXP >::import_expression(), and Rcpp::MatrixColumn< RTYPE >::operator=().

#define RCPP_LOOP_UNROLL_LHSFUN (   TARGET,
  FUN,
  SOURCE 
)
Value:
R_xlen_t __trip_count = n >> 2 ; \
R_xlen_t i = 0 ; \
for ( ; __trip_count > 0 ; --__trip_count) { \
TARGET[FUN(i)] = SOURCE[i] ; i++ ; \
TARGET[FUN(i)] = SOURCE[i] ; i++ ; \
TARGET[FUN(i)] = SOURCE[i] ; i++ ; \
TARGET[FUN(i)] = SOURCE[i] ; i++ ; \
} \
switch (n - i){ \
case 3: \
TARGET[FUN(i)] = SOURCE[i] ; i++ ; \
case 2: \
TARGET[FUN(i)] = SOURCE[i] ; i++ ; \
case 1: \
TARGET[FUN(i)] = SOURCE[i] ; i++ ; \
case 0: \
default: \
{} \
}

Definition at line 68 of file unroll.h.

Referenced by Rcpp::MatrixRow< RTYPE >::operator=().

#define RCPP_LOOP_UNROLL_PTR (   TARGET,
  SOURCE 
)
Value:
R_xlen_t __trip_count = n >> 2 ; \
R_xlen_t i = 0 ; \
for ( ; __trip_count > 0 ; --__trip_count) { \
*TARGET++ = SOURCE[i++] ; \
*TARGET++ = SOURCE[i++] ; \
*TARGET++ = SOURCE[i++] ; \
*TARGET++ = SOURCE[i++] ; \
} \
switch (n - i){ \
case 3: \
*TARGET++ = SOURCE[i++] ; \
case 2: \
*TARGET++ = SOURCE[i++] ; \
case 1: \
*TARGET++ = SOURCE[i++] ; \
case 0: \
default: \
{} \
}

Definition at line 25 of file unroll.h.