From a39bb585bdd272d0517786261eac55d40f13d6b1 Mon Sep 17 00:00:00 2001 From: Albert de Montserrat <58044444+albert-de-montserrat@users.noreply.github.com> Date: Fri, 25 Oct 2024 15:56:47 +0200 Subject: [PATCH] Wrap @init_parallel_stencil into __init__() (#268) * wrap @init_parallel_stencil into __init__() * format --- src/JustRelax_CPU.jl | 4 ++-- src/ext/AMDGPU/2D.jl | 2 +- src/ext/AMDGPU/3D.jl | 2 +- src/ext/CUDA/2D.jl | 2 +- src/ext/CUDA/3D.jl | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/JustRelax_CPU.jl b/src/JustRelax_CPU.jl index cb4134ee..5022bdb5 100644 --- a/src/JustRelax_CPU.jl +++ b/src/JustRelax_CPU.jl @@ -21,7 +21,7 @@ import JustRelax: import JustPIC._2D: numphases, nphases -@init_parallel_stencil(Threads, Float64, 2) +__init__() = @init_parallel_stencil(Threads, Float64, 2) include("common.jl") include("stokes/Stokes2D.jl") @@ -52,7 +52,7 @@ import JustRelax: import JustPIC._3D: numphases, nphases -@init_parallel_stencil(Threads, Float64, 3) +__init__() = @init_parallel_stencil(Threads, Float64, 3) include("common.jl") include("stokes/Stokes3D.jl") diff --git a/src/ext/AMDGPU/2D.jl b/src/ext/AMDGPU/2D.jl index b48fcb19..26d18d76 100644 --- a/src/ext/AMDGPU/2D.jl +++ b/src/ext/AMDGPU/2D.jl @@ -31,7 +31,7 @@ import JustRelax: import JustPIC._2D: nphases, numphases -@init_parallel_stencil(AMDGPU, Float64, 2) +__init__() = @init_parallel_stencil(AMDGPU, Float64, 2) include("../../common.jl") include("../../stokes/Stokes2D.jl") diff --git a/src/ext/AMDGPU/3D.jl b/src/ext/AMDGPU/3D.jl index 76fce83d..88390b4c 100644 --- a/src/ext/AMDGPU/3D.jl +++ b/src/ext/AMDGPU/3D.jl @@ -31,7 +31,7 @@ import JustRelax: import JustPIC._3D: numphases, nphases -@init_parallel_stencil(AMDGPU, Float64, 3) +__init__() = @init_parallel_stencil(AMDGPU, Float64, 3) include("../../common.jl") include("../../stokes/Stokes3D.jl") diff --git a/src/ext/CUDA/2D.jl b/src/ext/CUDA/2D.jl index c4315698..8245c480 100644 --- a/src/ext/CUDA/2D.jl +++ b/src/ext/CUDA/2D.jl @@ -24,7 +24,7 @@ import JustRelax: import JustPIC._2D: numphases, nphases -@init_parallel_stencil(CUDA, Float64, 2) +__init__() = @init_parallel_stencil(CUDA, Float64, 2) include("../../common.jl") include("../../stokes/Stokes2D.jl") diff --git a/src/ext/CUDA/3D.jl b/src/ext/CUDA/3D.jl index 4de3b352..fe24a2d8 100644 --- a/src/ext/CUDA/3D.jl +++ b/src/ext/CUDA/3D.jl @@ -23,7 +23,7 @@ import JustRelax: import JustPIC._3D: numphases, nphases -@init_parallel_stencil(CUDA, Float64, 3) +__init__() = @init_parallel_stencil(CUDA, Float64, 3) include("../../common.jl") include("../../stokes/Stokes3D.jl")