Test that FhtKacRotator is chosen by default
| 28 | |
| 29 | // Test that FhtKacRotator is chosen by default |
| 30 | TEST_F(RotatorTest, DefaultRotatorType) { |
| 31 | Rotator<float>* rotator = choose_rotator<float>(dim); |
| 32 | ASSERT_NE(rotator, nullptr); |
| 33 | |
| 34 | // FhtKacRotator pads to multiple of 64 |
| 35 | size_t padded_dim = rotator->size(); |
| 36 | EXPECT_EQ(padded_dim % 64, 0); |
| 37 | EXPECT_GE(padded_dim, dim); |
| 38 | |
| 39 | delete rotator; |
| 40 | } |
| 41 | |
| 42 | uint8_t bitreverse8(uint8_t x) { |
| 43 | x = (((x & 0x55) << 1) | ((x & 0xAA) >> 1)); |