pool

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Float32SlicePool

type Float32SlicePool struct {
	// contains filtered or unexported fields
}

Float32SlicePool float32切片对象池

func NewFloat32SlicePool

func NewFloat32SlicePool(size int) *Float32SlicePool

NewFloat32SlicePool 创建float32切片池

func (*Float32SlicePool) Get

func (p *Float32SlicePool) Get() []float32

Get 从池中获取一个切片

func (*Float32SlicePool) Put

func (p *Float32SlicePool) Put(s []float32)

Put 将切片归还到池中

type IntSlicePool

type IntSlicePool struct {
	// contains filtered or unexported fields
}

IntSlicePool int切片对象池

func NewIntSlicePool

func NewIntSlicePool(size int) *IntSlicePool

NewIntSlicePool 创建int切片池

func (*IntSlicePool) Get

func (p *IntSlicePool) Get() []int

Get 从池中获取一个切片

func (*IntSlicePool) Put

func (p *IntSlicePool) Put(s []int)

Put 将切片归还到池中

type SearchResultPool

type SearchResultPool struct {
	// contains filtered or unexported fields
}

SearchResultPool 搜索结果对象池

func NewSearchResultPool

func NewSearchResultPool() *SearchResultPool

NewSearchResultPool 创建搜索结果池

func (*SearchResultPool) Get

func (p *SearchResultPool) Get() []interface{}

Get 从池中获取一个切片

func (*SearchResultPool) Put

func (p *SearchResultPool) Put(s []interface{})

Put 将切片归还到池中

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL