Have a little Error here I cant figure out where it comes from:
External calls are not supported (found non-inlined call to memInit)
The source code is the following:
__global__ void doSHA(unsigned char * input, int length)
{
unsigned long tmp[16];
memInit(tmp, input, length);
}
__device__ void memInit(unsigned char * tmp, unsigned char * input, int length)
{
int stop = 0;
// reseting tmp
for(int i = 0; i < 16; i++) tmp[i] = 0;
// fill tmp like: message char c0,c1,c2,...,cn,10000000,00...000
for(int i = 0; i < length; i+=4)
{
for(int j = 0; j < 4; j++)
if(i + j < length)
tmp[i/4] |= input[i+j] << (24 - j * 8);
else
{
tmp[i/4] |= 128; // Append 1 then zeros
stop = 1;
break;
}
if(stop)
break;
}
// Adding length as last value
tmp[15] |= length;
}
Ty for your help!