is_cuda

PlainMatrix.is_cuda
행렬 평문이 GPU에 저장되어 있으면 True이고, 그렇지 않으면 False입니다.
  • 아웃풋
    • boolean
import numpy as np

from desilofhe import Engine

message = np.arange(64 * 64).reshape(64, 64)

gpu_engine = Engine(slot_count=64, mode="gpu")
gpu_plain_matrix = gpu_engine.encode_to_plain_matrix(message)

assert gpu_plain_matrix.is_cuda

cpu_engine = Engine(slot_count=64, mode="cpu")
cpu_plain_matrix = cpu_engine.encode_to_plain_matrix(message)

assert not cpu_plain_matrix.is_cuda