Files
opencloud/vendor/github.com/blevesearch/go-faiss/gpu_stub.go
dependabot[bot] 2b0d61acf5 build(deps): bump github.com/blevesearch/bleve/v2 from 2.5.7 to 2.6.0
Bumps [github.com/blevesearch/bleve/v2](https://github.com/blevesearch/bleve) from 2.5.7 to 2.6.0.
- [Release notes](https://github.com/blevesearch/bleve/releases)
- [Commits](https://github.com/blevesearch/bleve/compare/v2.5.7...v2.6.0)

---
updated-dependencies:
- dependency-name: github.com/blevesearch/bleve/v2
  dependency-version: 2.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-20 00:37:30 +00:00

42 lines
1.4 KiB
Go

// Copyright (c) 2026 Couchbase, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !gpu
package faiss
import "errors"
// GPUIndexImpl is an opaque type when not built with GPU support.
type GPUIndexImpl struct{}
func (g *GPUIndexImpl) Train(x []float32) error { return errGPUNotBuilt }
func (g *GPUIndexImpl) Add(x []float32) error { return errGPUNotBuilt }
func (g *GPUIndexImpl) Search(x []float32, k int64) ([]float32, []int64, error) {
return nil, nil, errGPUNotBuilt
}
func (g *GPUIndexImpl) Close() {}
var errGPUNotBuilt = errors.New("not built with GPU support (requires -tags gpu)")
// CloneToGPU is not available without the gpu build tag.
func CloneToGPU(_ *IndexImpl) (*GPUIndexImpl, error) {
return nil, errGPUNotBuilt
}
// CloneToCPU is not available without the gpu build tag.
func CloneToCPU(_ *GPUIndexImpl) (*IndexImpl, error) {
return nil, errGPUNotBuilt
}