Remove VectorShiftLeft: Usage previously removed.
PiperOrigin-RevId: 298457764 Change-Id: I4e92aed70e1bbf92235c70763eea4ae079057b36
This commit is contained in:
parent
0400e0bf99
commit
d17ab3f1d8
@ -562,15 +562,6 @@ void VectorScalarMultiply(const int8_t* vector, int v_size, float scale,
|
|||||||
void ClipVector(const float* vector, int v_size, float abs_limit,
|
void ClipVector(const float* vector, int v_size, float abs_limit,
|
||||||
float* result);
|
float* result);
|
||||||
|
|
||||||
// Shift left a vector in place with v_size size.
|
|
||||||
template <typename T>
|
|
||||||
void VectorShiftLeft(T* vector, int v_size, const T& shift_value) {
|
|
||||||
// When copying overlapping ranges, std::copy is appropriate when beginning of
|
|
||||||
// the destination range is outside the source range.
|
|
||||||
std::copy(vector + 1, vector + v_size, vector);
|
|
||||||
vector[v_size - 1] = shift_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reduce-sum on a float input vector:
|
// Reduce-sum on a float input vector:
|
||||||
// input_vector: float pointer to input vector.
|
// input_vector: float pointer to input vector.
|
||||||
// output_vector: float pointer to vector.
|
// output_vector: float pointer to vector.
|
||||||
|
|||||||
@ -1878,16 +1878,6 @@ TEST(uKernels, BatchVectorBatchVectorDotProductIntegerTest) {
|
|||||||
EXPECT_THAT(output, ElementsAreArray(ArrayFloatNear({40, 85})));
|
EXPECT_THAT(output, ElementsAreArray(ArrayFloatNear({40, 85})));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(uKernels, VectorShiftLeftTest) {
|
|
||||||
constexpr int kVectorSize = 5;
|
|
||||||
static float input[kVectorSize] = {0.0, -0.5, 1.0, -1.5, 2.0};
|
|
||||||
std::vector<float> result(kVectorSize);
|
|
||||||
VectorShiftLeft(input, kVectorSize, 3.0f);
|
|
||||||
result.assign(input, input + kVectorSize);
|
|
||||||
EXPECT_THAT(result,
|
|
||||||
ElementsAreArray(ArrayFloatNear({-0.5, 1.0, -1.5, 2.0, 3.0})));
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(uKernels, ReductionSumVectorTest) {
|
TEST(uKernels, ReductionSumVectorTest) {
|
||||||
constexpr int kInputVectorSize = 10;
|
constexpr int kInputVectorSize = 10;
|
||||||
constexpr int kOutputVectorSize1 = 5;
|
constexpr int kOutputVectorSize1 = 5;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user