Skip to content

Commit

Permalink
Neurons ni, di, var indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Nov 23, 2024
1 parent dd8c628 commit f059cb0
Show file tree
Hide file tree
Showing 37 changed files with 1,417 additions and 1,417 deletions.
312 changes: 156 additions & 156 deletions axon/act-layer.go

Large diffs are not rendered by default.

312 changes: 156 additions & 156 deletions axon/act-layer.goal

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion axon/act-net.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion axon/act-net.goal
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ func GPUTestWrite(i uint32) { //gosl:kernel
di := ctx.DataIndex(i)
ni := ctx.ItemIndex(i)
for vi := Spike; vi < NeuronVarsN; vi++ {
Neurons[ni, vi, di] = float32(ni*1000 + uint32(vi))
Neurons[ni, di, vi] = float32(ni*1000 + uint32(vi))
}
}

Expand Down
20 changes: 10 additions & 10 deletions axon/act-path.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions axon/act-path.goal
Original file line number Diff line number Diff line change
Expand Up @@ -249,22 +249,22 @@ func (pt *PathParams) GatherSpikesGSyn(ctx *Context, ly *LayerParams, ni, di uin
switch pt.Com.GType {
case ExcitatoryG:
*gSyn = ly.Acts.Dt.GeSynFromRaw(*gSyn, gRaw)
Neurons[ni, GeRaw, di] += gRaw
Neurons[ni, GeSyn, di] += *gSyn
Neurons[ni, di, GeRaw] += gRaw
Neurons[ni, di, GeSyn] += *gSyn
case InhibitoryG:
*gSyn = ly.Acts.Dt.GiSynFromRaw(*gSyn, gRaw)
Neurons[ni, GiRaw, di] += gRaw
Neurons[ni, GiSyn, di] += *gSyn
Neurons[ni, di, GiRaw] += gRaw
Neurons[ni, di, GiSyn] += *gSyn
case ModulatoryG:
*gSyn = ly.Acts.Dt.GeSynFromRaw(*gSyn, gRaw)
Neurons[ni, GModRaw, di] += gRaw
Neurons[ni, GModSyn, di] += *gSyn
Neurons[ni, di, GModRaw] += gRaw
Neurons[ni, di, GModSyn] += *gSyn
case MaintG:
*gSyn = ly.Acts.Dt.GeSynFromRaw(*gSyn, gRaw)
Neurons[ni, GMaintRaw, di] += gRaw
Neurons[ni, di, GMaintRaw] += gRaw
// note: Syn happens via NMDA in Act
case ContextG:
Neurons[ni, CtxtGeRaw, di] += gRaw
Neurons[ni, di, CtxtGeRaw] += gRaw
default:
}
}
Expand All @@ -279,9 +279,9 @@ func (pt *PathParams) SendSpike(ctx *Context, ni, di, lni uint32) {
if uint32(ctx.Cycle) != uint32(ctx.ThetaCycles)-1-pt.Com.DelLen {
return
}
sendVal *= Neurons[ni, Burst, di] // Burst is regular CaSpkP for all non-SuperLayer neurons
sendVal *= Neurons[ni, di, Burst] // Burst is regular CaSpkP for all non-SuperLayer neurons
} else {
if Neurons[ni, Spike, di] == 0 {
if Neurons[ni, di, Spike] == 0 {
return
}
}
Expand Down
458 changes: 229 additions & 229 deletions axon/act.go

Large diffs are not rendered by default.

Loading

0 comments on commit f059cb0

Please sign in to comment.