cdarnab / aparapi

Automatically exported from code.google.com/p/aparapi
0 stars 0 forks source link

put() for boolean[]? #64

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Try to put() an array of booleans:

    final boolean[] myBooleans;
    Kernel kernel = new Kernel() {...};
    kernel.put(myBooleans); // Causes compile-time error.

What is the expected output? What do you see instead?
Expect: code compiles.
See: compile-time error indicating method Kernel.put(boolean[]) does not exist.

What version of the product are you using? On what operating system?
Trunk from around 7/8/2012

Please provide any additional information below.
The documentation says Aparapi supports the boolean primitive type.

Original issue reported on code.google.com by oliver.c...@gmail.com on 14 Aug 2012 at 12:50

GoogleCodeExporter commented 8 years ago
Oliver

Clearly this is a missing API not sure how we missed this.  

Would you consider coding up a patch.  I think this should be just a couple of 
methods in Kernel and KernelRunner and will match the existing API's very 
closely...

Gary

Original comment by frost.g...@gmail.com on 14 Aug 2012 at 3:27

GoogleCodeExporter commented 8 years ago
I've attached a patch. I tested it with my own code (also attached if you're 
interested in making it a test case, didn't seem necessary since it's such a 
simple change), and it didn't cause any more unit test failures than revision 
607 of trunk already causes on my system (I guess these are expected or known):

    [junit] Test com.amd.aparapi.test.junit.codegen.AssignAndPassAsParameterSimple FAILED
    [junit] Test com.amd.aparapi.test.junit.codegen.ContinueTorture FAILED
    [junit] Test com.amd.aparapi.test.junit.codegen.FirstAssignInExpression FAILED
    [junit] Test com.amd.aparapi.test.junit.codegen.FirstAssignInExpression2 FAILED

Original comment by oliver.c...@gmail.com on 15 Aug 2012 at 1:51

Attachments:

GoogleCodeExporter commented 8 years ago
Awesome. Thanks Oliver. 

Welcome to the Aparapi contributors club! :) 

I applied the patch to trunk (r#612)

I also converted your test code to a junit test 
http://code.google.com/p/aparapi/source/browse/trunk/test/runtime/src/java/com/a
md/aparapi/test/runtime/ExplicitBoolean.java

Thanks.

Original comment by frost.g...@gmail.com on 15 Aug 2012 at 3:53