Tests/support/summation_kernel.cpp
/**
 * Calculates stride and start address per QPU
 *
 * @param reg_stride rf slot in which to store the stride
 */
Calculates stride and start address per QPU
@param reg_stride rf slot in which to store the stride
Calculates stride and start address per QPU @param reg_stride rf slot in which to store the stride
Instructions calc_stride( uint8_t num_qpus, uint8_t reg_stride) {
  using namespace V3DLib::v3d::instr;
  Instructions ret;
  uint8_t num_qpus_shift = get_shift(num_qpus);
  ret << mov(rf(reg_stride), 1).header("stride = 4 * 16 * num_qpus")
      << shl(rf(reg_stride), rf(reg_stride), 6 + num_qpus_shift);
  return ret;
}
Instructions calc_stride ( uint8_t num_qpus , uint8_t reg_stride ) { using namespace V3DLib :: v3d :: instr ; Instructions ret ; uint8_t num_qpus_shift = get_shift ( num_qpus ) ; ret << mov ( rf ( reg_stride ) , 1 ) . header ( " " ) << shl ( rf ( reg_stride ) , rf ( reg_stride ) , 6 + num_qpus_shift ) ; return ret ; }
Calculates stride and start address per QPU
 @param reg_stride rf slot in which to store the stride
Calculates stride and start address per QPU @param reg_stride rf slot in which to store the stride