in src/gowrapper/ckks/evaluator.go [57:78]
func lattigo_rotateHoisted(evalHandle Handle4, ctInHandle Handle4, ks *C.uint64_t, ksLen uint64, outHandles *C.uint64_t) {
var eval *ckks.Evaluator
eval = getStoredEvaluator(evalHandle)
var ctIn *ckks.Ciphertext
ctIn = getStoredCiphertext(ctInHandle)
rotations := make([]int, ksLen)
size := unsafe.Sizeof(uint64(0))
basePtrIn := uintptr(unsafe.Pointer(ks))
for i := range rotations {
rotations[i] = *(*int)(unsafe.Pointer(basePtrIn + size*uintptr(i)))
}
var rotatedCts map[int]*ckks.Ciphertext
rotatedCts = (*eval).RotateHoisted(ctIn, rotations)
basePtrOut := uintptr(unsafe.Pointer(outHandles))
for i := range rotations {
*(*uint64)(unsafe.Pointer(basePtrOut + size*uintptr(i))) = marshal.CrossLangObjMap.Add(unsafe.Pointer(rotatedCts[rotations[i]]))
}
}