- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for SparseMapPos (0.4 sec)
-
src/cmd/compile/internal/ssa/sparsemappos.go
key ID val int32 pos src.XPos } type sparseMapPos struct { dense []sparseEntryPos sparse []int32 } // newSparseMapPos returns a sparseMapPos that can map // integers between 0 and n-1 to the pair <int32,src.XPos>. func newSparseMapPos(n int) *sparseMapPos { return &sparseMapPos{dense: nil, sparse: make([]int32, n)} } func (s *sparseMapPos) cap() int { return len(s.sparse) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 31 21:41:06 UTC 2022 - 1.7K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/allocators.go
func (c *Cache) allocSparseMapPos(n int) *sparseMapPos { var s *sparseMapPos n2 := n if n2 < 32 { n2 = 32 } b := bits.Len(uint(n2 - 1)) v := poolFreeSparseMapPos[b-5].Get() if v == nil { s = newSparseMapPos(1 << b) } else { s = v.(*sparseMapPos) } return s } func (c *Cache) freeSparseMapPos(s *sparseMapPos) { s.clear() b := bits.Len(uint(s.cap()) - 1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 15 23:00:54 UTC 2023 - 7.4K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/allocators.go
capacity: "%s.cap()", mak: "newSparseMap(%s)", resize: "", // larger-sized sparse maps are ok clear: "%s.clear()", minLog: 5, maxLog: 32, }, { name: "SparseMapPos", typ: "*sparseMapPos", capacity: "%s.cap()", mak: "newSparseMapPos(%s)", resize: "", // larger-sized sparse maps are ok clear: "%s.clear()", minLog: 5, maxLog: 32, }, }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 23:34:11 UTC 2023 - 6.7K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/func.go
// newSparseMapPos returns a sparse map that can store at least up to n integers. func (f *Func) newSparseMapPos(n int) *sparseMapPos { return f.Cache.allocSparseMapPos(n) } // retSparseMapPos returns a sparse map to the config's cache of sparse // sets to be reused by f.newSparseMapPos. func (f *Func) retSparseMapPos(ss *sparseMapPos) { f.Cache.freeSparseMapPos(ss) } // newPoset returns a new poset from the internal cache
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 19:44:43 UTC 2024 - 25.8K bytes - Viewed (0)