building forwared()

This commit is contained in:
ton
2023-07-14 13:59:23 +07:00
parent fc676d1ccd
commit 2e34679f73
5 changed files with 191 additions and 135 deletions

78
src/snnUtil.jl Normal file
View File

@@ -0,0 +1,78 @@
module snnUtil
export refractoryStatus!
# using
#------------------------------------------------------------------------------------------------100
function refractoryStatus!(refractoryCounter, refractoryActive, refractoryInactive)
d1, d2, d3, d4 = size(refractoryCounter)
for j in 1:d4
for i in 1:d3
if refractoryCounter[1, 1, i, j] > 0 # inactive
view(refractoryActive, 1, 1, i, j) .= 0
view(refractoryInactive, 1, 1, i, j) .= 1
else
view(refractoryActive, 1, 1, i, j) .= 1
view(refractoryInactive, 1, 1, i, j) .= 0
end
end
end
end
end # module