template metaprogram mat_ptrs_outcheck builds on 'mat_ptrs' by also checking whether any of the input matrices are aliases of the output matrix More...
#include <glue_metaprog.hpp>
Public Types | |
typedef T1::elem_type | elem_type |
Static Public Member Functions | |
static void | get_ptrs (const Mat< elem_type > **ptrs, bool *del, const T1 &X, const Mat< elem_type > *out_ptr) |
Static Public Attributes | |
static const u32 | num = 0 |
template metaprogram mat_ptrs_outcheck builds on 'mat_ptrs' by also checking whether any of the input matrices are aliases of the output matrix
Definition at line 134 of file glue_metaprog.hpp.
typedef T1::elem_type mat_ptrs_outcheck< glue_type, T1 >::elem_type |
Definition at line 136 of file glue_metaprog.hpp.
static void mat_ptrs_outcheck< glue_type, T1 >::get_ptrs | ( | const Mat< elem_type > ** | ptrs, | |
bool * | del, | |||
const T1 & | X, | |||
const Mat< elem_type > * | out_ptr | |||
) | [inline, static] |
Definition at line 144 of file glue_metaprog.hpp.
Referenced by mat_ptrs_outcheck< glue_type, Glue< T1, T2, glue_type > >::get_ptrs().
00150 { 00151 00152 const bool same_ptr = 00153 ( 00154 is_Mat<T1>::value ? 00155 ( 00156 (out_ptr == reinterpret_cast<const Mat<elem_type>*>(&X)) ? 00157 true 00158 : 00159 false 00160 ) 00161 : 00162 false 00163 ); 00164 00165 00166 ptrs[0] = 00167 ( 00168 same_ptr ? 00169 new Mat<elem_type>(X) 00170 : 00171 ( 00172 is_Mat<T1>::value ? 00173 reinterpret_cast<const Mat<elem_type>*>(&X) 00174 : 00175 new Mat<elem_type>(X) 00176 ) 00177 ); 00178 00179 00180 del[0] = 00181 ( 00182 same_ptr ? 00183 true 00184 : 00185 ( 00186 is_Mat<T1>::value ? 00187 false 00188 : 00189 true 00190 ) 00191 ); 00192 00193 00194 }
const u32 mat_ptrs_outcheck< glue_type, T1 >::num = 0 [static] |
Definition at line 138 of file glue_metaprog.hpp.
Referenced by mat_ptrs_outcheck< glue_type, Glue< T1, T2, glue_type > >::get_ptrs().