Commit 8b54fa0e authored by Martin Beseda's avatar Martin Beseda
Browse files

TMP (uncompilable): attempting to fix compilation error

parent c43a5d7c
......@@ -60,8 +60,7 @@ module connection_m
!! @return Weight of the connection (type real)
procedure :: get_weight => get_weight_impl
!> Passes (assigns) the product
!! input neuron state * weight)
!> Passes (assigns) the product (input neuron state * weight)
!! to an output neuron.
procedure :: pass_signal => pass_signal_impl
......@@ -157,7 +156,7 @@ module connection_m
call time_profiling_stop(start_time, 'new_connection_2')
#endif
end function new_connection_2
!> Constructor of connection_t class
!! @param[in] input_neuron Pointer to the input neuron (instance of neuron_t)
!! @param[in] output_neuron Pointer to the output neuron (instance of neuron_t)
......@@ -168,6 +167,7 @@ module connection_m
class(neuron_t), pointer, intent(in) :: output_neuron
real(kind=real_4neuro), intent(in) :: weight
type(connection_t), pointer :: new_obj
#ifdef TIME_PROFILING
real :: start_time
call time_profiling_start(start_time)
......@@ -387,9 +387,10 @@ module connection_m
real :: start_time
call time_profiling_start(start_time)
#endif
allocate(new_obj)
allocate(new_obj)
call new_obj%init_components(input_neuron, output_neuron, weight)
#ifdef TIME_PROFILING
call time_profiling_stop(start_time, 'new_interval_connection_3')
#endif
......
......@@ -3,10 +3,10 @@ program connection_mem_leak_test
use neuron_m
use normal_m
class(mock_neuron_t), pointer :: n1_p
class(mock_neuron_t), pointer :: n2_p
type(mock_neuron_t), pointer :: n1_p
type(mock_neuron_t), pointer :: n2_p
class(interval_connection_t), pointer :: con1, con2
class(connection_t), pointer :: con1, con2
print *, '+---------------------------------------------------------+'
print *, '| STARTING MEMORY LEAK TESTING OF THE MODULE CONNECTION_M |'
......@@ -16,13 +16,11 @@ program connection_mem_leak_test
n1_p => mock_neuron_t()
n2_p => mock_neuron_t()
print *, 'Creating an instance of the class interval_connection_t with 3-parameters constructor...'
con1 => interval_connection_t(input_neuron=n1_p, &
output_neuron=n2_p, &
weight=5.25)
print *, 'Creating an instance of the class interval_connection_t with 2-parameters constructor...'
con2 => interval_connection_t(input_neuron=n1_p, output_neuron=n2_p)
con2 => connection_t(input_neuron=n1_p, output_neuron=n2_p)
print *, 'Creating an instance of the class interval_connection_t with 3-parameters constructor...'
con1 => connection_t(input_neuron=n1_p, output_neuron=n2_p, weight=5.25)
deallocate(con1)
deallocate(con2)
......
......@@ -25,7 +25,6 @@ module neuron_m
real(kind=real_4neuro) :: potential !< Neuron inner potential
real(kind=real_4neuro) :: state !< State of the neuron (0/1 for binary n. etc.)
integer(kind=integer_4neuro) :: id !< Neuron ID
contains
......@@ -309,7 +308,7 @@ module neuron_m
function new_mock_neuron() result(new_obj)
type(mock_neuron_t), pointer :: new_obj
#ifdef TIME_PROFILING
real :: start_time
real :: start_time
call time_profiling_start(start_time)
#endif
allocate(new_obj)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment