示例#1
0
    void accumQuery(const BlockVector<G1>& query,
                    const BlockVector<Fr>& scalar,
                    ProgressCallback* callback = nullptr)
    {
#ifdef USE_ASSERT
        assert(query.space() == scalar.space() &&
               query.block() == scalar.block());
#endif

        accumQuery(query.vec(),
                   scalar.vec(),
                   callback);
    }
示例#2
0
    // must accumulate all blocks
    void accumVector(const BlockVector<T>& At,
                     const BlockVector<T>& Bt,
                     const BlockVector<T>& Ct) {
#ifdef USE_ASSERT
        assert(At.space() == Bt.space() &&
               Bt.space() == Ct.space() &&
               At.block() == Bt.block() &&
               Bt.block() == Ct.block());
#endif

        for (std::size_t i = At.startIndex(); i < At.stopIndex(); ++i) {
            m_vec[i] =
                m_random_beta_rA * At[i] +
                m_random_beta_rB * Bt[i] +
                m_random_beta_rC * Ct[i];
        }
    }
示例#3
0
 PPZK_QueryHK(const BlockVector<Fr>& qap_query)
     : PPZK_QueryHK{qap_query.space(), qap_query.block()[0]}
 {}