Add files via upload
This commit is contained in:
parent
6477fb29e2
commit
1a807b44df
1 changed files with 67 additions and 52 deletions
|
@ -3,11 +3,12 @@
|
|||
#include <omp.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
// #define DEBUGSHOWTIMEGLOBAL
|
||||
|
||||
HDynamicCNNGPU::HDynamicCNNGPU()
|
||||
{
|
||||
|
@ -111,6 +112,11 @@ void HDynamicCNNGPU::entrypoint(
|
|||
// --------------------
|
||||
assert((number_of_processes <= 0));
|
||||
|
||||
#ifdef DEBUGSHOWTIMEGLOBAL
|
||||
using TIME_resolution = std::chrono::nanoseconds;
|
||||
auto TIME_start = std::chrono::high_resolution_clock::now();
|
||||
#endif
|
||||
|
||||
gpu_update(
|
||||
h_init_ptr,
|
||||
h_pointer,
|
||||
|
@ -136,6 +142,12 @@ void HDynamicCNNGPU::entrypoint(
|
|||
number_of_pattern,
|
||||
gpu_tuning_factor);
|
||||
|
||||
#ifdef DEBUGSHOWTIMEGLOBAL
|
||||
auto TIME_end = std::chrono::high_resolution_clock::now();
|
||||
float TIME_measured = TIME_resolution(TIME_end - TIME_start).count();
|
||||
std::cout << "Time used : " << TIME_measured/(1000.0*1000.0) << "ms" << std::endl;
|
||||
#endif
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
|
@ -193,8 +205,11 @@ __device__ void gpu_update_one_ip(
|
|||
|
||||
spike = input_pointer + counter_spike * input_dim_c1;
|
||||
|
||||
if (*spike >= 0)
|
||||
if (*spike < 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (epsilon_xy_dim_c0 != 0)
|
||||
{
|
||||
epsilon_subsegment =
|
||||
|
@ -251,7 +266,7 @@ __device__ void gpu_update_one_ip(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
temp_value = 1.0 / epsilon_scale;
|
||||
|
||||
|
|
Loading…
Reference in a new issue