Hi I wrote the following kernel to label a 2-D matrix/image with its 1-D index. In an earlier build I had written code for 1-indexing, which I updated later on to 0-indexing as follows.
int __attribute__((kernel)) ccl_initlabel(uint32_t x, uint32_t y) { int x_ = (int)x; int y_ = (int)y; int width = (int)rsAllocationGetDimX(inp); int height = (int)rsAllocationGetDimY(inp); int index = y_ * width + x_; // in an earlier version, it was 1 indexed return 0; int flag = (int)step(1.0f, (float)rsGetElementAt_uchar(inp,x_,y_)); return (index*(1-flag) - flag); } I call this kernel on 2 different allocations one after the other like this: sc_ebab->forEach_ccl_initlabel(LAlloc); // call 1 sc_ebab->forEach_ccl_initlabel(RAlloc); // call 2 When I updated the code from 1-indexing to 0-indexing, the behaviour of call 1 got updated but not of call 2. Interestingly this kind of sticky behaviour of 2nd call is visible only when the app reinstalled without uninstalling (If I uninstall manually and then install the updated build both calls' behaviour is updated). What could be the possible reason? *Note: I am working on Nexus 6* Regards 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/6ad09a54-dfd7-4f46-8d12-b397f3d327a4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.