forked from DataIntelligenceCrew/go-faiss
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgpu_bindings_cpu.go
More file actions
31 lines (23 loc) · 832 Bytes
/
gpu_bindings_cpu.go
File metadata and controls
31 lines (23 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//go:build cpu
// +build cpu
package faiss
import "C"
import "errors"
func TransferToGpu(index Index) (Index, error) {
return nil, errors.New("Not supported when running in CPU mode..")
}
func TransferToCpu(index Index) (Index, error) {
return nil, errors.New("Not supported when running in CPU mode..")
}
func Free(gpuIndex Index) error {
return errors.New("Not supported when running in CPU mode..")
}
func CreateGpuIndex() (Index, error) {
return nil, errors.New("Not supported when running in CPU mode..")
}
func TransferToAllGPUs(index Index, gpuIndexes []int, sharding bool) (Index, error) {
return nil, errors.New("Not supported when running in CPU mode..")
}
func TransferToAllGPUsWithOptions(index Index, gpuIndexes []int) (Index, error) {
return nil, errors.New("Not supported when running in CPU mode..")
}