11#include "util/create_vmpl_sequence.hpp"
13template<
typename T,
unsigned int stencil_size,
typename vector_vmpl,
unsigned int dim>
18 typedef typename vmpl_sum_constant<2*stencil_size,vector_vmpl>::type stop_border_vmpl;
25template<
typename T,
unsigned int stencil_size,
typename vector_vmpl,
unsigned int dim>
32 T (& ptr)[base::sizeBlock];
36 __device__ __host__
explicit cp_block(T (& ptr)[base::sizeBlock])
40 template<
typename ... ArgsT>
41 __device__ __host__ T & operator()(ArgsT ... args)
43 return ptr[Lin_vmpl_off<vector_vmpl,typename base::start_border_vmpl>(args ...)];
47template<
typename T,
unsigned int stencil_size,
typename vector_vmpl>
54 T (& ptr)[base::sizeBlock];
58 __device__ __host__
explicit cp_block(T (& ptr)[base::sizeBlock])
62 __device__ __host__
int LinId(
int i ,
int j)
64 return Lin_vmpl_off<vector_vmpl,typename base::start_border_vmpl>(i,j);
67 __device__ __host__ T & operator()(
int i ,
int j)
69 return ptr[Lin_vmpl_off<vector_vmpl,typename base::start_border_vmpl>(i,j)];
73template<
typename T,
unsigned int stencil_size,
typename vector_vmpl>
80 T (& ptr)[base::sizeBlock];
84 __device__ __host__
explicit cp_block(T (& ptr)[base::sizeBlock])
88 __device__ __host__
int LinId(
int i ,
int j,
int k)
90 return Lin_vmpl_off<vector_vmpl,typename base::start_border_vmpl>(i,j,k);
93 __device__ __host__ T & operator()(
int i ,
int j,
int k)
95 return ptr[Lin_vmpl_off<vector_vmpl,typename base::start_border_vmpl>(i,j,k)];
to_variadic_const_impl< 1, N, M, exit_::value, M >::type type
generate the boost::fusion::vector apply H on each term