Copyright 2016 The RE2 Authors. All Rights Reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. ifndef RE2_BITMAP256_H_ define RE2_BITMAP256_H_ ifdef _MSC_VER include <intrin.h> endif
// Source: https://github.com/infiniflow/ragflow | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright 2016 The RE2 Authors. All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#ifndef RE2_BITMAP256_H_
#define RE2_BITMAP256_H_
#ifdef _MSC_VER
#include <intrin.h>
#endif
#include <stdint.h>
#include <string.h>
#include "util/logging.h"
namespace re2 {
class Bitmap256 {
public:
Bitmap256() { Clear(); }
// Clears all of the bits.
void Clear() { memset(words_, 0, sizeof words_); }
// Tests the bit with index c.
bool Test(int c) const {
DCHECK_GE(c, 0);
DCHECK_LE(c
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key