
Back-propagation Implementation 223
data storage variables are allocated memory space and initialized. In the
BP_Clean_Up() routine, the results are stored in an output file and the memory
space previously allocated is de-allocated. The
BP_Main_Loop() routine is the
core of the back-propagation implementation, where the state machine is run.
Listing 6.4
Back-propagation main() routine.
void main (int argc, char *argv[])
{
int idx_i;
// check command line
if (argc != 2)
{
printf("Usage: exe_file run_file");
exit(1);
}
main_start_up(argv[1]);
BP_Main_Loop();
main_clean_up();
}
static void main_start_up (char *dataFile)
{
BP_Start_Up(dataFile);
}
static void main_clean_up ...