diff --git a/unsupported/test/cxx11_tensor_fft.cpp b/unsupported/test/cxx11_tensor_fft.cpp index a55369477..ef5f1a312 100644 --- a/unsupported/test/cxx11_tensor_fft.cpp +++ b/unsupported/test/cxx11_tensor_fft.cpp @@ -228,10 +228,13 @@ template static void test_fft_non_power_of_2_round_trip(int exponent) { int n = (1 << exponent) + 1; - Eigen::DSizes dimensions; + // The dimension type needs to be at least 8 bytes long for the + // Tensor constructor to work. On Windows, long is only 4 bytes long, + // so use long long here to force the usage of a 8 bytes integer type. + Eigen::DSizes dimensions; dimensions[0] = n; - const DSizes arr = dimensions; - Tensor input; + const DSizes arr = dimensions; + Tensor input; input.resize(arr); input.setRandom(); @@ -242,7 +245,7 @@ static void test_fft_non_power_of_2_round_trip(int exponent) { Tensor, 1, ColMajor> forward = input.template fft(fft); - Tensor output = + Tensor output = forward.template fft(fft); for (int i = 0; i < n; ++i) {