Friday, September 2, 2011

[android-developers] Bug in Renderscript API of the pown()???

Hi, the function pown() in Renderscript may have bugs.

//rs_cl.rsh
_RS_RUNTIME float __attribute__((overloadable)) pown(float v, int p);
_RS_RUNTIME float2 __attribute__((overloadable)) pown(float2 v, int2
p);
_RS_RUNTIME float3 __attribute__((overloadable)) pown(float3 v, int3
p);
_RS_RUNTIME float4 __attribute__((overloadable)) pown(float4 v, int4
p);

I experimentally execute the scalar version, float pown(float f,int
i).
Then it returns the value of f^i, so I think that it seems like the
pow() function.
Next I execute the vector version of pown(), but it seems that they
don't work,
because they always return the value 1.000000 as follows, this is
float3 pown().

//code
float3 f3 = {2.0f, 3.0f, 10.0f};
int3 p3 = {10,5,2};
float3 r3 = pown(f3,p3);
rsDebug("pown : ", r3.x, r3.y, r3.z);

//rsDebug log of the above code
09-02 16:42:37.460: DEBUG/RenderScript(10395): pown : {1.000000,
1.000000, 1.000000}


Does anyone know about it?
I'm hoping that someone can help me.

Kind Regards,
Macotonalds.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment