Thread Safe Fast Rotations

Suppose I wanted to do multiple rotations over the same ciphertext (in CKKS), then I’ll use auto precomp = EvalFastRotationPrecompute() to obtain some rotation pre-computation and then use EvalFastRotation() to calculate the actual rotation. Now suppose I wanted to improve performance by multi-threading my program. So I’ll do one auto precomp = EvalFastRotationPrecompute() and multiple threads will simultaneously access precomp when performing EvalFastRotation(). Would precomp be thread-safe under EvalFastRotation()?

Thanks in advance.

Yes, it should be thread-safe as precomp will not be modified during the calls to EvalFastRotation.

1 Like