1 #include <stdlib.h> 2 #include "tree-vect.h" 3 4 typedef struct { 5 double *I; 6 double W; 7 double X; 8 double V; 9 double U; 10 double P; 11 double Q; 12 double R; 13 } f1_neuron; 14 15 f1_neuron *f1_layer; 16 17 int numf1s = 1000; 18 19 void __attribute__((noinline,noclone)) reset_nodes()20reset_nodes() 21 { 22 int i; 23 24 for (i=0;i<numf1s;i++) 25 { 26 f1_layer[i].W = 0.0; 27 f1_layer[i].X = 0.0; 28 f1_layer[i].V = 0.0; 29 f1_layer[i].U = 0.0; 30 f1_layer[i].P = 0.0; 31 f1_layer[i].Q = 0.0; 32 f1_layer[i].R = 0.0; 33 } 34 } 35 main()36int main () 37 { 38 int i; 39 check_vect (); 40 f1_layer = (f1_neuron *)malloc (numf1s * sizeof (f1_neuron)); 41 for (i = 0; i < numf1s; i++) 42 f1_layer[i].I = (double *)-1; 43 reset_nodes (); 44 for (i = 0; i < numf1s; i++) 45 if (f1_layer[i].I != (double *)-1) 46 abort (); 47 return 0; 48 } 49