| 213 | } |
| 214 | |
| 215 | void ecall_decrypt(float *input,int N, float *output){ |
| 216 | for(int j=0;j<N;j++){ |
| 217 | output[j] = 0.0f; |
| 218 | float sum = input[insert*N+j]; |
| 219 | float c = 0.0f; |
| 220 | for(int i=0;i<Nt;i++){ |
| 221 | float y = input[indexs[i]*N+j] - c; |
| 222 | float t = sum + y; |
| 223 | c = (t - sum) - y; |
| 224 | sum = t; |
| 225 | } |
| 226 | output[j] = sum; |
| 227 | } |
| 228 | return; |
| 229 | } |
| 230 | |
| 231 | void ecall_relu(float *input,int N,float *output){ |
| 232 | float *x = (float*)malloc(sizeof(float)*N); |