Example #1
0
	void CpuSNN::printSimSummary(FILE *fp)
	{
		DBG(2, fpLog, AT, "printSimSummary()");
		float etime;
		if(currentMode == GPU_MODE)	 {
			stopGPUTiming();
			etime = gpuExecutionTime;
			CUDA_SAFE_CALL( cudaMemcpyFromSymbol( &spikeCountD2, "secD2fireCnt", sizeof(int), 0, cudaMemcpyDeviceToHost));
			CUDA_SAFE_CALL( cudaMemcpyFromSymbol( &spikeCountD1, "secD1fireCnt", sizeof(int), 0, cudaMemcpyDeviceToHost));
			spikeCountAll1sec = spikeCountD1 + spikeCountD2;
			CUDA_SAFE_CALL( cudaMemcpyFromSymbol( &spikeCountD2, "spikeCountD2", sizeof(int), 0, cudaMemcpyDeviceToHost));
			CUDA_SAFE_CALL( cudaMemcpyFromSymbol( &spikeCountD1, "spikeCountD1", sizeof(int), 0, cudaMemcpyDeviceToHost));
			spikeCountAll      = spikeCountD1 + spikeCountD2;
		}
		else {
			stopCPUTiming();
			etime = cpuExecutionTime;
		}

		fprintf(fp, "\n*** Network configuration dumped in %s.dot file...\n\
				Use graphViz to see the network connectivity...\n\n", networkName.c_str());
		fprintf(fp, "*********** %s Simulation Summary **********\n", (currentMode == GPU_MODE)?("GPU"):"CPU");
		fprintf(fp, "Network Parameters: \n\tN = %d (numNExcReg:numNInhReg=%2.1f:%2.1f), numPostSynapses = %d, D = %d\n", numN, 100.0*numNExcReg/numN, 100.0*numNInhReg/numN, numPostSynapses, D);
		fprintf(fp, "Random Seed: %d\n", randSeed);
		fprintf(fp, "Timing: \n\tModel Simulation Time = %lld sec \n\tActual Execution Time = %4.2f sec\n",  (unsigned long long)simTimeSec, etime/1000.0);
		fprintf(fp, "Average Firing Rate \n\t2+ms delay = %3.3f Hz \n\t1ms delay = %3.3f Hz \n\tOverall = %3.3f Hz\n",
			spikeCountD2/(1.0*simTimeSec*numNExcReg), spikeCountD1/(1.0*simTimeSec*numNInhReg), spikeCountAll/(1.0*simTimeSec*numN));
		fprintf(fp, "Overall Firing Count: \n\t2+ms delay = %d \n\t1ms delay = %d \n\tTotal = %d\n",
			spikeCountD2, spikeCountD1, spikeCountAll );
		fprintf(fp, "**************************************\n\n");

		fflush(fp);
	}
Example #2
0
SEXP R_auto_cudaMemcpyFromSymbol(SEXP r_dst, SEXP r_symbol, SEXP r_count, SEXP r_offset, SEXP r_kind)
{
    SEXP r_ans = R_NilValue;
    void * dst = GET_REF(r_dst, void );
    const void * symbol = GET_REF(r_symbol, const void );
    size_t count = REAL(r_count)[0];
    size_t offset = REAL(r_offset)[0];
    enum cudaMemcpyKind kind = (enum cudaMemcpyKind) INTEGER(r_kind)[0];
    
    cudaError_t ans;
    ans = cudaMemcpyFromSymbol(dst, symbol, count, offset, kind);
    
    r_ans = Renum_convert_cudaError_t(ans) ;
    
    return(r_ans);
}
Example #3
0
cudaError_t WINAPI wine_cudaMemcpyFromSymbol( void *dst, const char *symbol, size_t count, size_t offset , enum cudaMemcpyKind kind ) {
    WINE_TRACE("\n");
    return cudaMemcpyFromSymbol( dst, symbol, count, offset, kind );
}