From 18bb584fdfb110549558b0a7377c22c4fa014e93 Mon Sep 17 00:00:00 2001 From: Alberto Ramos Date: Wed, 6 Oct 2021 18:30:43 +0200 Subject: [PATCH] Bugs corrected --- src/Fields/Fields.jl | 12 +++++++++++- src/YM/YM.jl | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Fields/Fields.jl b/src/Fields/Fields.jl index ae665f3..f5a5f4a 100644 --- a/src/Fields/Fields.jl +++ b/src/Fields/Fields.jl @@ -9,7 +9,17 @@ ### created: Wed Oct 6 17:37:03 2021 ### +module Fields + +using CUDA +using ..Space + vector_field(::Type{T}, lp::SpaceParm) where {T} = CuArray{T, 3}(undef, lp.bsz, lp.ndim, lp.rsz) -scalar_field(::Type{T}, lp::SpaceParm) where {T} = CuArray{T, 3}(undef, lp.bsz, lp.rsz) +scalar_field(::Type{T}, lp::SpaceParm) where {T} = CuArray{T, 2}(undef, lp.bsz, lp.rsz) nscalar_field(::Type{T}, n, lp::SpaceParm) where {T} = CuArray{T, 3}(undef, lp.bsz, n, lp.rsz) + +export vector_field, scalar_field, nscalar_field + +end + diff --git a/src/YM/YM.jl b/src/YM/YM.jl index ebdf41d..f257b70 100644 --- a/src/YM/YM.jl +++ b/src/YM/YM.jl @@ -15,6 +15,7 @@ module YM using CUDA, Random, StructArrays using ..Space using ..Groups +using ..Fields import Base.show @@ -85,7 +86,7 @@ end include("YMfields.jl") -export field, field_pln, randomize!, zero!, norm2 +export randomize!, zero!, norm2 include("YMact.jl") export krnl_plaq!, force0_wilson!