small
typedef small Inputs[p];
static small F3_freeze(int16_t x) { return x - 3 * ((10923 * x + 16384) >> 15); }
static int Weightw_mask(small *r) {
static void R3_fromRq(small *out, const Fq *r) {
static void R3_mult(small *h, const small *f, const small *g) {
static int R3_recip(small *out, const small *in) {
small f[p + 1], g[p + 1], v[p + 1], r[p + 1];
static void Rq_mult_small(Fq *h, const Fq *f, const small *g) {
static int Rq_recip3(Fq *out, const small *in) {
static void Short_fromlist(small *out, const uint32_t *in) {
static void Short_random(small *out) {
static void Small_random(small *out) {
static void KeyGen(Fq *h, small *f, small *ginv) {
small g[p];
static void Encrypt(Fq *c, const small *r, const Fq *h) {
static void Decrypt(small *r, const Fq *c, const small *f, const small *ginv) {
small e[p], ev[p];
static void Small_encode(unsigned char *s, const small *f) {
small x = 0;
static void Small_decode(small *f, const unsigned char *s) {
for (j = 0;j < 4;++j) *f++ = ((small)((x >> (2 * j)) & 3)) - 1;
*f++ = ((small)(*s & 3)) - 1;
small f[p], v[p];
small f[p], v[p];
static void smallfelem_neg(felem out, const smallfelem small)
out[0] = zero105[0] - small[0];
out[1] = zero105[1] - small[1];
out[2] = zero105[2] - small[2];
out[3] = zero105[3] - small[3];
static void smallfelem_square(longfelem out, const smallfelem small)
a = ((uint128_t)small[0]) * small[0];
a = ((uint128_t)small[0]) * small[1];
a = ((uint128_t)small[0]) * small[2];
a = ((uint128_t)small[0]) * small[3];
a = ((uint128_t)small[1]) * small[2];
a = ((uint128_t)small[1]) * small[1];
a = ((uint128_t)small[1]) * small[3];
a = ((uint128_t)small[2]) * small[3];
a = ((uint128_t)small[2]) * small[2];
a = ((uint128_t)small[3]) * small[3];
u64 small[4];
felem_shrink(small, in);
smallfelem_square(out, small);
static limb smallfelem_is_zero(const smallfelem small)
u64 is_zero = small[0] | small[1] | small[2] | small[3];
is_p = (small[0] ^ kPrime[0]) | (small[1] ^ kPrime[1]) | (small[2] ^ kPrime[2]) | (small[3] ^ kPrime[3]);
static int smallfelem_is_zero_int(const void *small)
return (int)(smallfelem_is_zero(small) & ((limb)1));
ATF_TC_WITHOUT_HEAD(small);
ATF_TC_BODY(small, tc)
ATF_TP_ADD_TC(tp, small);
TEST(fmaximum_magf, float, big, small, expected_max_mag, rmode);
TEST(fmaximum_magf, float, small, big, expected_max_mag, rmode);
TEST(fmaximum_mag, double, big, small, expected_max_mag, rmode);
TEST(fmaximum_mag, double, small, big, expected_max_mag, rmode);
TEST(fmaximum_magl, long double, big, small, expected_max_mag, rmode);
TEST(fmaximum_magl, long double, small, big, expected_max_mag, rmode);
TEST(fminimum_magf, float, big, small, expected_min_mag, rmode);
TEST(fminimum_magf, float, small, big, expected_min_mag, rmode);
TEST(fminimum_mag, double, big, small, expected_min_mag, rmode);
TEST(fminimum_mag, double, small, big, expected_min_mag, rmode);
TEST(fminimum_magl, long double, big, small, expected_min_mag, rmode);
TEST(fminimum_magl, long double, small, big, expected_min_mag, rmode);
testall_num_r(long double big, long double small, int rmode) {
long double expected_max_num = isnan(big) ? small : big;
long double expected_min_num = isnan(small) ? big : small;
TEST(fmaximum_numf, float, big, small, expected_max_num, rmode);
TEST(fmaximum_numf, float, small, big, expected_max_num, rmode);
TEST(fmaximum_num, double, big, small, expected_max_num, rmode);
TEST(fmaximum_num, double, small, big, expected_max_num, rmode);
TEST(fmaximum_numl, long double, big, small, expected_max_num, rmode);
TEST(fmaximum_numl, long double, small, big, expected_max_num, rmode);
TEST(fminimum_numf, float, big, small, expected_min_num, rmode);
TEST(fminimum_numf, float, small, big, expected_min_num, rmode);
TEST(fminimum_num, double, big, small, expected_min_num, rmode);
TEST(fminimum_num, double, small, big, expected_min_num, rmode);
TEST(fminimum_numl, long double, big, small, expected_min_num, rmode);
TEST(fminimum_numl, long double, small, big, expected_min_num, rmode);
testall(long double big, long double small)
testall_r(big, small, rmodes[i]);
testall_mag_r(big, small, rmodes[i]);
testall_num_r(big, small, rmodes[i]);
testall_r(long double big, long double small, int rmode)
if (isnan(big) || isnan(small)) {
expected_min = small;
TEST(fmaximumf, float, big, small, expected_max, rmode);
TEST(fmaximumf, float, small, big, expected_max, rmode);
TEST(fmaximum, double, big, small, expected_max, rmode);
TEST(fmaximum, double, small, big, expected_max, rmode);
TEST(fmaximuml, long double, big, small, expected_max, rmode);
TEST(fmaximuml, long double, small, big, expected_max, rmode);
TEST(fminimumf, float, big, small, expected_min, rmode);
TEST(fminimumf, float, small, big, expected_min, rmode);
TEST(fminimum, double, big, small, expected_min, rmode);
TEST(fminimum, double, small, big, expected_min, rmode);
TEST(fminimuml, long double, big, small, expected_min, rmode);
TEST(fminimuml, long double, small, big, expected_min, rmode);
testall_mag_r(long double big, long double small, int rmode) {
if (isnan(big) || isnan(small)) {
if (fabsl(small) > fabsl(big)) {
expected_max_mag = small;
expected_min_mag = small;
testall_r(long double big, long double small, int rmode)
long double expected_max = isnan(big) ? small : big;
long double expected_min = isnan(small) ? big : small;
TEST(fmaxf, float, big, small, expected_max, rmode);
TEST(fmaxf, float, small, big, expected_max, rmode);
TEST(fmax, double, big, small, expected_max, rmode);
TEST(fmax, double, small, big, expected_max, rmode);
TEST(fmaxl, long double, big, small, expected_max, rmode);
TEST(fmaxl, long double, small, big, expected_max, rmode);
TEST(fminf, float, big, small, expected_min, rmode);
TEST(fminf, float, small, big, expected_min, rmode);
TEST(fmin, double, big, small, expected_min, rmode);
TEST(fmin, double, small, big, expected_min, rmode);
TEST(fminl, long double, big, small, expected_min, rmode);
TEST(fminl, long double, small, big, expected_min, rmode);
testall(long double big, long double small)
testall_r(big, small, rmodes[i]);
ATF_TC_WITHOUT_HEAD(small);
ATF_TC_BODY(small, tc)
ATF_TP_ADD_TC(tp, small);
m->options.small = val;
val = m->options.small;
if (count < _manager->options.small
_manager->options.small = SMALL_ALLOCATION;
unsigned small;
_manager->options.small = SMALL_ALLOCATION;
unsigned small;
m->options.small = val;
val = m->options.small;
unsigned count = _manager->options.small;
int next_is_first, chop, cnt, rdma_count, small;
small = (mss <= MXGEFW_SEND_SMALL_SIZE);
(small * MXGEFW_FLAGS_SMALL);
number between 0 and 1 (typically small).
if (small && ofmt != FMTF_DECIMAL)
int l, small, formats;
small = 0;
small = (sizeof(st->st_dev) == 4);
small = (sizeof(st->st_ino) == 4);
small = (sizeof(st->st_mode) == 4);
small = (sizeof(st->st_dev) == 4);
small = (sizeof(st->st_uid) == 4);
small = (sizeof(st->st_gid) == 4);
small = (sizeof(ts.tv_sec) == 4);
small = (sizeof(st->st_size) == 4);
small = (sizeof(st->st_blocks) == 4);
small = (sizeof(st->st_blksize) == 4);
small = (sizeof(st->st_flags) == 4);
small = (sizeof(st->st_gen) == 4);
small = 0;
small = 0;
small = 0;
small = 0;