The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

simpleconcepts (2) [Avatar] Offline
#1
Hi,

Thanks to Matthew & Manning for Wonderful book (will much needed smilie )

Well, I am in chapter 11 and looking at code. I checked sample Ch11_string_search on Windows and Linux couldn't get it to work.

1/ Program compiled on linux and windows (x64), but somehow vectoring code (string_search.cl)
2/ but "Number of occurrences of ..." for all are printed 0 (Zero)
3/ To be sure, I added few other functions like check device available (from Chapter #2) etc, they worked fine. Still Program finishes execution with device info etc. and "Number of occurrences of ..." for all are printed 0 (Zero)
4/ For debugging, I tested code in Intel OpenCL problem appears to be with "SDK Kernel <string_search> was not vectorized" message and comes specifically in context of
/* Iterate through characters in text */
for(int i=item_offset; i<item_offset + chars_per_item; i++) { >

/* load global text into private buffer */
text_vector = vload16(0, text + i);
:
:

Please provide any possible help. I tried to test code with both devices (Intel Sandy bridge i7 and Nvidia 525M) but same issue persists.

Thanks in advance.

Best Regards,
Aditya
simpleconcepts (2) [Avatar] Offline
#2
Re: Code issues
Anyone, Any advice? Still stuck!

Thanks!