gonuma: A utility library for writing NUMA-aware Go applications. https://github.com/johnsonjh/gonuma/
|
|
3 years ago | |
|---|---|---|
| .github | 4 years ago | |
| .deepsource.toml | 4 years ago | |
| .fossa.yml | 4 years ago | |
| .gitattributes | 4 years ago | |
| .gitlab-ci.yml | 4 years ago | |
| .gonuma_root | 4 years ago | |
| .mergify.yml | 4 years ago | |
| .whitesource | 4 years ago | |
| LICENSE | 4 years ago | |
| README.md | 4 years ago | |
| SECURITY.md | 4 years ago | |
| bitmask.go | 4 years ago | |
| bitmask_test.go | 4 years ago | |
| cov_report.sh | 4 years ago | |
| dependabot.yml | 4 years ago | |
| go.mod | 3 years ago | |
| go.sum | 3 years ago | |
| gonuma_license_test.go | 4 years ago | |
| numa.go | 4 years ago | |
| numa_linux.go | 4 years ago | |
| numa_linux_amd64.s | 4 years ago | |
| numa_linux_test.go | 4 years ago | |
| numa_other.go | 4 years ago | |
| numa_other.s | 4 years ago | |
| numa_test.go | 4 years ago | |
| vdso_linux_amd64.go | 4 years ago | |
| vdso_linux_amd64_test.go | 4 years ago |
gonuma is a Go utility library for writing NUMA-aware applications
package main
import (
gonuma "github.com/johnsonjh/gonuma"
)
type object struct {
X int
_ [...]byte // pad to page size
}
var objects = make(
[]object,
gonuma.CPUCount(),
)
func fnxxxx() {
cpu, node := gonuma.GetCPUAndNode()
objects[cpu].X = xx
}