mean() of a complex array

[Old posts from the commercial version of ArrayFire] Discussion of ArrayFire using CUDA or OpenCL.

Moderator: pavanky

mean() of a complex array

Postby sebktm » Mon Dec 16, 2013 2:52 pm

Hi,

if I want to take the mean of an array with complex entries, do I have to extract the real and imaginary values? The code below will crash:
Code: Select all
       
array test = randu(5, 5, 5, c64);
print(test);
print(mean(real(test)));
print(mean(imag(test)));
print(mean((test, 2)));


The error I'm getting is:
src/gena/gcache.cpp:41: CUDA driver error: invalid compiled kernel (209)
sebktm
 
Posts: 7
Joined: Wed Dec 11, 2013 12:07 pm

Re: mean() of a complex array

Postby shehzan » Mon Dec 16, 2013 4:55 pm

Hi

Thanks for posting this.
The first 2 mean print functions are working fine.
The last line in the code provided crashes. We will investigate this and revert to you as soon as possible.
----
Shehzan
Developer
AccelerEyes
User avatar
shehzan
 
Posts: 121
Joined: Tue Feb 12, 2013 7:20 pm

Re: mean() of a complex array

Postby shehzan » Mon Dec 16, 2013 5:56 pm

Hi

We have tested out the code and various possibilities.
The bug is causing a crash only in division for c64 arrays. Operations like sum etc are working fine on c64, and division is working fine on all datatypes except c64.
We are working on this issue.
If you do not need c64 data types, I would suggest that you use c32 until we can fix this issue.
We apologize for the inconvenience.
----
Shehzan
Developer
AccelerEyes
User avatar
shehzan
 
Posts: 121
Joined: Tue Feb 12, 2013 7:20 pm

Re: mean() of a complex array

Postby sebktm » Tue Dec 17, 2013 11:39 am

Hi,

I was not shure if it was intended to do the mean in the real and complex domain independently. I'm glad to help in finding such bugs. I will use the mean in the seperate way because in this part of program I need the accuracy. Again thanks for the fast support!
sebktm
 
Posts: 7
Joined: Wed Dec 11, 2013 12:07 pm


Return to [archive-commercial] Programming & Development with ArrayFire

cron