forked from Alisah-Ozcan/HEonGPU
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefines.h
40 lines (30 loc) · 1.21 KB
/
defines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2024 Alişah Özcan
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
// Developer: Alişah Özcan
#ifndef DEFINES_H
#define DEFINES_H
// --------------------- //
// Author: Alisah Ozcan
// --------------------- //
// Range of the polynomial degree
#define MAX_POLY_DEGREE 65536 // 2^16 for now!
#define MIN_POLY_DEGREE 4096 // 2^12
// Range of the bit-length of all user-defined modulus
#define MAX_USER_DEFINED_MOD_BIT_COUNT 60
#define MIN_USER_DEFINED_MOD_BIT_COUNT 30
// Range of the bit-length of all modulus
#define MAX_MOD_BIT_COUNT 61
#define MIN_MOD_BIT_COUNT 30
// Max auxiliary base count for BFV scheme
#define MAX_BSK_SIZE 64
// Max power of galois key capability, e.g., if MAX_SHIFT is 8, rotation
// capability range is between 0 and 255(2^(8 - 1))
#define MAX_SHIFT 8
// Memorypool sizes
constexpr static float initial_device_memorypool_size =
0.5f; // %50 of GPU memory
constexpr static float max_device_memorypool_size = 0.8f; // %80 of GPU memory
constexpr static float initial_host_memorypool_size = 0.1f; // %10 of CPU memory
constexpr static float max_host_memorypool_size = 0.2f; // %20 of CPU memory
#endif // DEFINES_H