use anyhow::Result;
use poulpy_core::layouts::{GGLWEInfos, prepared::GLWEAutomorphismKeyPreparedToBackendRef};
use poulpy_core::layouts::{GGLWEPreparedToBackendRef, GLWEToBackendMut, GLWEToBackendRef, GetGaloisElement};
use poulpy_hal::layouts::{Backend, ScratchArena};
use crate::{CKKSCtBounds, SetCKKSInfos};
pub trait CKKSConjugateOps<BE: Backend> {
fn ckks_conjugate_tmp_bytes<C, K>(&self, ct_infos: &C, key_infos: &K) -> usize
where
C: CKKSCtBounds,
K: GGLWEInfos;
fn ckks_conjugate_into<Dst, Src, K>(
&self,
dst: &mut Dst,
src: &Src,
key: &K,
scratch: &mut ScratchArena<'_, BE>,
) -> Result<()>
where
Dst: GLWEToBackendMut<BE> + CKKSCtBounds + SetCKKSInfos,
Src: GLWEToBackendRef<BE> + CKKSCtBounds,
K: GLWEAutomorphismKeyPreparedToBackendRef<BE> + GGLWEPreparedToBackendRef<BE> + GetGaloisElement + GGLWEInfos;
fn ckks_conjugate_assign<Dst, K>(&self, dst: &mut Dst, key: &K, scratch: &mut ScratchArena<'_, BE>) -> Result<()>
where
Dst: GLWEToBackendMut<BE> + CKKSCtBounds + SetCKKSInfos,
K: GLWEAutomorphismKeyPreparedToBackendRef<BE> + GGLWEPreparedToBackendRef<BE> + GetGaloisElement + GGLWEInfos;
}