mirror of
https://github.com/luxfi/fhe.git
synced 2026-07-26 23:16:08 +00:00
- Remove luxgpu build tag requirement - just cgo is sufficient - Add ArangeInt and ToSlice generic functions to fhe_ops.go - Fix ToSlice to use correct C API (lux_gpu_tensor_data takes output buffer) - Update imports to include unsafe package and string.h header - Merge unique functions from tfhe_ops_cgo.go into fhe_ops.go When CGO_ENABLED=1, all lux C++ libs from ~/work/luxcpp are used. No special tags needed.
17 lines
449 B
Go
17 lines
449 B
Go
//go:build !cgo
|
|
|
|
// Package gpu provides FHE operations with optional GPU acceleration.
|
|
// This file provides stub implementations when CGO is disabled or luxgpu tag is not set.
|
|
|
|
package gpu
|
|
|
|
// GPUAvailable returns false when CGO is disabled or luxgpu is not enabled
|
|
func GPUAvailable() bool {
|
|
return false
|
|
}
|
|
|
|
// GetBackend returns "CPU (pure Go)" when CGO is disabled or luxgpu is not enabled
|
|
func GetBackend() string {
|
|
return "CPU (pure Go)"
|
|
}
|