I want to get all substring of a string on xeon phi
First, I read a txt file from args and store it into a pointer array like this
char *temp_string[N_ELEMENT];
Second, I want to using pragma offlad to copt this array to xeon phi like this
#pragma offload target(mic: 0) in(temp_string:length(N_ELEMENT))
The command line give me the following message
error: variable "temp_string" used in in/out/inout clause is an array whose underlying type is "char *"
Is it have any solutation to fix my problem?
The offload section like this:
#pragma offload target(mic: 0) in(temp_string:length(N_ELEMENT)) #pragma omp parallel for private(c, i, length) for(n = 0; n < N_ELEMENT; ++n) { length = strlen(temp_string[n]); for( c = 0 ; c < length ; c++ ) for( i = 1 ; i <= length - c ; i++ ) { sub = substring(temp_string[n], c+1, i); printf("%s \n", sub); } }