Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vsipl++] Fast convolution (slow!)


  • To: vsipl++@xxxxxxxxxxxxxxxx
  • Subject: [vsipl++] Fast convolution (slow!)
  • From: Gaetano Mendola <gmendola@xxxxxxxxxxx>
  • Date: Mon, 04 Aug 2008 10:00:42 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,
I'm evaluating VSIPL++ for an application heavily based on convolutions.

I tried the following code to estimate some execution time:

int
main(int argc, char **argv)
{
  vsip::vsipl init(argc, argv);

  typedef vsip::complex<float> T;

  const unsigned long long N = 10000;

  vsip::Vector<T> inputs(N);
  vsip::Vector<T> filters(N);
  vsip::Vector<T> outputs(N);

  typedef vsip::Fft<vsip::const_Vector, T, T, vsip::fft_fwd, vsip::by_reference> fwd_fft_type;
  typedef vsip::Fft<vsip::const_Vector, T, T, vsip::fft_inv, vsip::by_reference> inv_fft_type;

  fwd_fft_type fwd_fft(N, 1.0f);
  inv_fft_type inv_fft(N, 1.0f/N);

  fwd_fft(inputs, outputs);
  outputs *= filters;
  inv_fft(outputs);
}

and I obtained the following data:

fwd_fft_type fwd_fft(N, 1.0f); -> 19.041 sec [19041 ms]
inv_fft_type inv_fft(N, 1.0f/N); -> 19.009 sec [19009 ms]
Convolution -> 000 ms

now, I can accept a 40seconds as start up time for my final application but I have to raise that N to around
1E6 (one of the two vectors containse 1E6 samples, the second one contains 3k samples) so it seems not doable,
am I doing something wrong? Atm I'm doing some tests on a Xeon processor in production should be CellBe.

Regards
Gaetano Mendola








-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIlrcq7UpzwH2SGd4RArvJAKDmNIYTmOAcEL0DLhiaH+IV2xitzwCfUO31
mI9nc9MfjWVosqJJmqi06D0=
=TdnR
-----END PGP SIGNATURE-----