| 223 | // Shift left a vector in place with v_size size. |
| 224 | template <typename T> |
| 225 | void VectorShiftLeft(T* vector, int v_size, const T& shift_value) { |
| 226 | // When copying overlapping ranges, std::copy is appropriate when beginning of |
| 227 | // the destination range is outside the source range. |
| 228 | std::copy(vector + 1, vector + v_size, vector); |
| 229 | vector[v_size - 1] = shift_value; |
| 230 | } |
| 231 | |
| 232 | // Reduce-sum on a float input vector: |
| 233 | // input_vector: float pointer to input vector. |