 				}
 			}
 
+			#ifdef DEBUGGING
+				printf("Finished epoch %d", epoch);
+			#endif
+
 			//update the weight updaters
 			alpha *= alphaDecay;
 			neighbourhood *= nDecay;

#include "CUDA_kohonengenerator.h"
#include <float.h>
#include <stdio.h>

//parameters held in constant memory
__constant__ Kohonen_Generator_Information info;

				cudaMemcpyAsync( &minIndex, device_IndexBuffer, sizeof(short2), cudaMemcpyDeviceToHost, *stream );
				cudaStreamSynchronize(*stream);
				UpdateWeights<<<grid, threads, 0, *stream>>>(device_KohonenMap, minIndex, alpha, neighbourhood);
			
			}

			#ifdef DEBUGGING
				printf("Finished epoch %d", epoch);
			#endif

			//update the weight updaters
			alpha *= alphaDecay;
			neighbourhood *= nDecay;
		}

	}
