Hello.
Sorry for my English.
I'm learning OpenCL.
It will be possible to compare a char16 * to char *?
char16 * is an array with many words.
char * is a word.
The idea is to explore whether char16 * contains the word of char *
very basic example:
__kernel void buscaPalabra(__global char16* words,__global char* word,__global int* result)
{
int i = get_global_id(0);
// **This comparison does not work because they are of different types. I could not convert **
if(words==word){
result =1;
}
Thk
}
Hi Franchute13,
__kernel void buscaPalabra(__global char16* words,__global char* word,__global int* result)
{
int i = get_global_id(0);
if(words.s0==word){
result =1;
}
}
Try to use KernelAnalyzer.
Hello.
Thanks for the reply!
I´m use KernelAnalyzer but not knowledge.
Thx
I think you should have a look at OpenCL 1.2 specification.
a question
this line
if(words.s0==word){
I understand that only compares the first character of CHAR16* WORDS with the first character of CHAR* WORD and not the word contained in the pointers. Is this correct?
Thx
Have you tried something like the following?
if (any(words == word))
{
;
}