to_cpu

Engine.to_cpu(data)
Move the data to the CPU if it is stored on the GPU.
  • Input:
    • Any data structures created through the engine.
  • Output:
    • None
from desilofhe import Engine

engine = Engine(mode="gpu")
secret_key = engine.create_secret_key()

assert secret_key.is_cuda

engine.to_cpu(secret_key)

assert not secret_key.is_cuda