[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/arrayfire/arrayfire/feature/optional-graphics/test/fft_large.cpp [Back]  [Original]

/*******************************************************
 * Copyright (c) 2015, ArrayFire
 * All rights reserved.
 *
 * This file is distributed under 3-clause BSD license.
 * The complete license agreement can be obtained at:
 * http://arrayfire.com/licenses/BSD-3-Clause
 ********************************************************/

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

using af::array;
using af::cfloat;
using af::fft2;
using af::ifft2;
using af::moddims;
using af::randu;
using std::endl;
using std::string;
using std::vector;

TEST(fft2, CPP_4D) {
    array a = randu(1024, 1024, 32);
    array b = fft2(a);

    array A = moddims(a, 1024, 1024, 4, 8);
    array B = fft2(A);

    cfloat *h_b = b.host();
    cfloat *h_B = B.host();

    for (int i = 0; i < (int)a.elements(); i++) {
        ASSERT_EQ(h_b[i], h_B[i]) 

Web Proxy Viewer  |  New URL  |  Original Page