Commit b1d7c35a authored by Martin Beseda's avatar Martin Beseda
Browse files

FIX: Fixed constructors of interval_connection_t by adding 'intent(in)' to the...

FIX: Fixed constructors of interval_connection_t by adding 'intent(in)' to the input parameters (neuron_t pointers)
parent f49fcd3d
......@@ -268,10 +268,10 @@ module connection_m
!! @param[in] output_neuron Pointer to the output neuron (instance of neuron_t)
!! @param[in] weight Weight of the connection (real number)
subroutine connection_init_components_impl(this, input_neuron, output_neuron, weight)
class(connection_t), intent(inout) :: this
class(neuron_t), pointer :: input_neuron
class(neuron_t), pointer :: output_neuron
real, intent(in) :: weight
class(connection_t), intent(inout) :: this
class(neuron_t), pointer :: input_neuron
class(neuron_t), pointer :: output_neuron
real, intent(in) :: weight
#ifdef TIME_PROFILING
real :: start_time
......@@ -346,8 +346,8 @@ module connection_m
!! @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)
function new_interval_connection_2(input_neuron, output_neuron) result(new_obj)
class(neuron_t), pointer :: input_neuron
class(neuron_t), pointer :: output_neuron
class(neuron_t), pointer, intent(in) :: input_neuron
class(neuron_t), pointer, intent(in) :: output_neuron
real :: weight
type(interval_connection_t), pointer :: new_obj
integer :: values(8)
......@@ -371,8 +371,8 @@ module connection_m
!! @param[in] output_neuron Pointer to the output neuron (instance of neuron_t)
!! @param[in] weight Weight of the connection (real number)
function new_interval_connection_3(input_neuron, output_neuron, weight) result(new_obj)
class(neuron_t), pointer :: input_neuron
class(neuron_t), pointer :: output_neuron
class(neuron_t), pointer, intent(in) :: input_neuron
class(neuron_t), pointer, intent(in) :: output_neuron
real, intent(in) :: weight
type(interval_connection_t), pointer :: new_obj
#ifdef TIME_PROFILING
......
......@@ -3,9 +3,6 @@ program connection_mem_leak_test
use neuron_m
use normal_m
type(mock_neuron_t), target :: n1
type(mock_neuron_t), target :: n2
type(mock_neuron_t), pointer :: n1_p
type(mock_neuron_t), pointer :: n2_p
type(mock_neuron_t), pointer :: dummy_p
......@@ -22,8 +19,8 @@ program connection_mem_leak_test
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)
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)
......
Supports Markdown
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