Skip to content
BitVecMatchIndices

BitVecMatchIndices

Description

Vec-flavoured handle for a sequence of bit-pattern match indices. Consumed by the Vec form of BitVecFindAllPattern.

Usage example (Cross-references)

Usage examples (Cross-references)
        BitVecPush(&pattern, true);
    
        BitVecMatchIndices matches = VecInitT(matches, base);
        result                     = result && BitVecFindAllPattern(&source, &pattern, &matches);
        result                     = result && matches.length == 5;
    }
    
    bool bitvec_find_all_pattern_vec(BitVec *bv, BitVec *pattern, BitVecMatchIndices *out) {
        ValidateBitVec(bv);
        ValidateBitVec(pattern);
    
        if (!out || !out->allocator) {
            LOG_FATAL("output BitVecMatchIndices is NULL or uninitialized");
        }
        ///
        u64  bitvec_find_all_pattern_raw(BitVec *bv, BitVec *pattern, size *results, u64 max_results);
        bool bitvec_find_all_pattern_vec(BitVec *bv, BitVec *pattern, BitVecMatchIndices *out);
    
    #define BitVecFindAllPattern(...)                         MISRA_OVERLOAD(BitVecFindAllPattern, __VA_ARGS__)
Last updated on