I have a struct defined as
struct sData{
idx * id;
int * stime;
bool * result;
unsigned int N;
};
Then the code that uses it in
numeric compute(numeric e, sData swabs){
numeric cache=0.0;
int sid=0;
while(sid<swabs.N){
if(swab.result[sid])
cache += log(e);
else cache += log(1.0-e);
sid += 1;
}
return cache;
}
but when compiling I get the error.
paug_cuda.cu(602): error: expression must have class type
What is this supposed to mean. what class type? I'm using a bool in a logical expression. what else could there be to this. What am I missing?