예제 #1
0
 static void exec(BlockT& block, value_type const& val)
 {
   for (vsip::index_type x=0; x<block.size(3, 2); ++x)
     for (vsip::index_type y=0; y<block.size(3, 1); ++y)
       for (vsip::index_type z=0; z<block.size(3, 0); ++z)
         block.put(z, y, x, val);
 }
예제 #2
0
void
redim_put(BlockT &blk,
	  index_type l_idx,
	  typename BlockT::value_type value,
	  integral_constant<int, 3>)
{
  index_type idx[3];

  for (dimension_type d=3; d-->0;)
  {
    idx[d] = l_idx % blk.size(3, d);
    l_idx /= blk.size(3, d);
  }

  blk.put(idx[0], idx[1], idx[2], value);
}
void
redim_put(
  BlockT&                     blk,
  index_type                  l_idx,
  typename BlockT::value_type value,
  Int_type<2>)
{
  typedef typename Block_layout<BlockT>::order_type order_type;

  dimension_type dim[2];
  index_type     idx[2];
  dim[0] = order_type::impl_dim0;
  dim[1] = order_type::impl_dim1;

  for (dimension_type d=2; d-->0;)
  {
    idx[dim[d]] = l_idx % blk.size(2, dim[d]);
    l_idx /= blk.size(2, dim[d]);
  }

  blk.put(idx[0], idx[1], value);
}
예제 #4
0
  static void exec(BlockT& block, value_type const& val)
  {
    for (vsip::index_type c=0; c<block.size(2, 1); ++c)
      for (vsip::index_type r=0; r<block.size(2, 0); ++r)
	block.put(r, c, val);
  }
예제 #5
0
 static void exec(BlockT& block, value_type const& val)
 {
   for (index_type i=0; i<block.size(1, 0); ++i)
     block.put(i, val);
 }