Skip to content

Commit

Permalink
Update splicer code to use C_SIZE_T for dimension array
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeckingsale committed Oct 3, 2023
1 parent 20839b2 commit 5e74a79
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
38 changes: 16 additions & 22 deletions src/umpire/interface/c_fortran/genfumpiresplicer.f
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
! Generated by genfumpiresplicer.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Copyright (c) 2016-23, Lawrence Livermore National Security, LLC and Umpire
! project contributors. See the COPYRIGHT file for details.
!
! SPDX-License-Identifier: (MIT)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


! splicer begin class.Allocator.type_bound_procedure_part
Expand Down Expand Up @@ -88,7 +82,7 @@ subroutine allocator_allocate_int_array_1d(this, array, dims)
class(UmpireAllocator) :: this
integer(C_INT), intent(inout), pointer, dimension(:) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -125,7 +119,7 @@ subroutine allocator_allocate_int_array_2d(this, array, dims)
class(UmpireAllocator) :: this
integer(C_INT), intent(inout), pointer, dimension(:, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -162,7 +156,7 @@ subroutine allocator_allocate_int_array_3d(this, array, dims)
class(UmpireAllocator) :: this
integer(C_INT), intent(inout), pointer, dimension(:, :, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -199,7 +193,7 @@ subroutine allocator_allocate_int_array_4d(this, array, dims)
class(UmpireAllocator) :: this
integer(C_INT), intent(inout), pointer, dimension(:, :, :, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -236,7 +230,7 @@ subroutine allocator_allocate_long_array_1d(this, array, dims)
class(UmpireAllocator) :: this
integer(C_LONG), intent(inout), pointer, dimension(:) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -273,7 +267,7 @@ subroutine allocator_allocate_long_array_2d(this, array, dims)
class(UmpireAllocator) :: this
integer(C_LONG), intent(inout), pointer, dimension(:, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -310,7 +304,7 @@ subroutine allocator_allocate_long_array_3d(this, array, dims)
class(UmpireAllocator) :: this
integer(C_LONG), intent(inout), pointer, dimension(:, :, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -347,7 +341,7 @@ subroutine allocator_allocate_long_array_4d(this, array, dims)
class(UmpireAllocator) :: this
integer(C_LONG), intent(inout), pointer, dimension(:, :, :, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -384,7 +378,7 @@ subroutine allocator_allocate_float_array_1d(this, array, dims)
class(UmpireAllocator) :: this
real(C_FLOAT), intent(inout), pointer, dimension(:) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -421,7 +415,7 @@ subroutine allocator_allocate_float_array_2d(this, array, dims)
class(UmpireAllocator) :: this
real(C_FLOAT), intent(inout), pointer, dimension(:, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -458,7 +452,7 @@ subroutine allocator_allocate_float_array_3d(this, array, dims)
class(UmpireAllocator) :: this
real(C_FLOAT), intent(inout), pointer, dimension(:, :, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -495,7 +489,7 @@ subroutine allocator_allocate_float_array_4d(this, array, dims)
class(UmpireAllocator) :: this
real(C_FLOAT), intent(inout), pointer, dimension(:, :, :, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -532,7 +526,7 @@ subroutine allocator_allocate_double_array_1d(this, array, dims)
class(UmpireAllocator) :: this
real(C_DOUBLE), intent(inout), pointer, dimension(:) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -569,7 +563,7 @@ subroutine allocator_allocate_double_array_2d(this, array, dims)
class(UmpireAllocator) :: this
real(C_DOUBLE), intent(inout), pointer, dimension(:, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -606,7 +600,7 @@ subroutine allocator_allocate_double_array_3d(this, array, dims)
class(UmpireAllocator) :: this
real(C_DOUBLE), intent(inout), pointer, dimension(:, :, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down Expand Up @@ -643,7 +637,7 @@ subroutine allocator_allocate_double_array_4d(this, array, dims)
class(UmpireAllocator) :: this
real(C_DOUBLE), intent(inout), pointer, dimension(:, :, :, :) :: array

integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims

type(C_PTR) :: data_ptr

Expand Down
2 changes: 1 addition & 1 deletion src/umpire/interface/c_fortran/genumpiresplicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def gen_methods():
class(UmpireAllocator) :: this
{c_type}, intent(inout), pointer, dimension({dim_string}) :: array
integer, dimension(:) :: dims
integer(C_SIZE_T), dimension(:) :: dims
type(C_PTR) :: data_ptr
Expand Down

0 comments on commit 5e74a79

Please sign in to comment.