Skip to content

Commit

Permalink
No need to initialise backends with dirps any more.
Browse files Browse the repository at this point in the history
  • Loading branch information
semi-h committed Feb 22, 2024
1 parent 776d278 commit f5b24eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/cuda/backend.f90
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@ module m_cuda_backend

contains

function init(globs, allocator, xdirps, ydirps, zdirps) result(backend)
function init(globs, allocator) result(backend)
implicit none

class(globs_t) :: globs
class(allocator_t), target, intent(inout) :: allocator
class(dirps_t), intent(in) :: xdirps, ydirps, zdirps
type(cuda_backend_t) :: backend

type(cuda_poisson_fft_t) :: cuda_poisson_fft
Expand Down
3 changes: 1 addition & 2 deletions src/omp/backend.f90
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ module m_omp_backend

contains

function init(globs, allocator, xdirps, ydirps, zdirps) result(backend)
function init(globs, allocator) result(backend)
implicit none

class(globs_t) :: globs
class(allocator_t), target, intent(inout) :: allocator
class(dirps_t), intent(in) :: xdirps, ydirps, zdirps
type(omp_backend_t) :: backend

integer :: n_halo, n_block
Expand Down
4 changes: 2 additions & 2 deletions src/xcompact.f90
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ program xcompact
allocator => cuda_allocator
print*, 'CUDA allocator instantiated'

cuda_backend = cuda_backend_t(globs, allocator, xdirps, ydirps, zdirps)
cuda_backend = cuda_backend_t(globs, allocator)
backend => cuda_backend
print*, 'CUDA backend instantiated'
#else
omp_allocator = allocator_t([SZ, globs%nx_loc, globs%n_groups_x])
allocator => omp_allocator
print*, 'OpenMP allocator instantiated'

omp_backend = omp_backend_t(globs, allocator, xdirps, ydirps, zdirps)
omp_backend = omp_backend_t(globs, allocator)
backend => omp_backend
print*, 'OpenMP backend instantiated'
#endif
Expand Down

0 comments on commit f5b24eb

Please sign in to comment.