Skip to content

Commit

Permalink
More inlining
Browse files Browse the repository at this point in the history
  • Loading branch information
jwallwork23 committed Jan 14, 2025
1 parent dd31d8d commit d696e4d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/test/unit/test_tensor_constructors.pf
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,9 @@ contains
class(TestCaseType), intent(inout) :: this
type(torch_tensor) :: tensor
integer, parameter :: ndims = 2
integer(c_int64_t), dimension(2) :: tensor_shape
integer(c_int64_t), dimension(2), parameter :: tensor_shape = [2, 3]
integer, parameter :: dtype = torch_kFloat32

tensor_shape = [2, 3]

! Check the tensor pointer is not associated
@assertFalse(c_associated(tensor%p))

Expand Down Expand Up @@ -110,14 +108,12 @@ contains
class(TestCaseType), intent(inout) :: this
type(torch_tensor) :: tensor
integer, parameter :: ndims = 2
integer(c_int64_t), dimension(2) :: tensor_shape
integer(c_int64_t), dimension(2), parameter :: tensor_shape = [2, 3]
integer, parameter :: dtype = torch_kFloat32
real(wp), dimension(:,:), pointer :: out_data
real(wp), dimension(2,3) :: expected
logical :: test_pass

tensor_shape = [2, 3]

! Check the tensor pointer is not associated
@assertFalse(c_associated(tensor%p))

Expand Down Expand Up @@ -166,14 +162,12 @@ contains
class(TestCaseType), intent(inout) :: this
type(torch_tensor) :: tensor
integer, parameter :: ndims = 2
integer(c_int64_t), dimension(2) :: tensor_shape
integer(c_int64_t), dimension(2), parameter :: tensor_shape = [2, 3]
integer, parameter :: dtype = torch_kFloat32
real(wp), dimension(:,:), pointer :: out_data
real(wp), dimension(2,3) :: expected
logical :: test_pass

tensor_shape = [2, 3]

! Check the tensor pointer is not associated
@assertFalse(c_associated(tensor%p))

Expand Down

0 comments on commit d696e4d

Please sign in to comment.