Hi I started exploring the HelloComputeNDK example that uses Renderscript in C++ to change the saturation of an image, converting it to gray image. I noticed that after running the script on allocations, the output alloc is copied to the outputPtr buffer, which is very "*time consuming operation"*. I also noticed that the allocations are created with RS_ALLOCATION_USAGE_SHARED flag (I understand from this that buffer and allocation are sharing memory). So I skipped the copying statements
//inputAlloc->copy2DRangeFrom(0, 0, X, Y, inputPtr); //outputAlloc->copy2DRangeTo(0, 0, X, Y, outputPtr); This reduces the time of execution. This works on samsung galaxy s6. But on nexus 6 phone, this *does not work*. I get a a blank image in case of nexus 6. What is going wrong here. What is the proper way to avoid copying the allocation to buffer and reduce the execution time. Thanks Ruppesh -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/52329420-200b-4fa3-9ddb-bc693a407ce8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.