namespace internal


compute_ed

#include "xf_data_analytics/text/editDistance.hpp"
template <
    int N,
    int BITS
    >
void compute_ed (
    char pattern_string [N],
    char input_string [N],
    ap_uint <BITS> northwest [N],
    ap_uint <BITS> north [N],
    ap_uint <BITS> west [N]
    )

compute one step against diagonal line

Parameters:

pattern_string shifted input string
input_string input query string
northwest cache bits at northwest direction
north cache bits at north direction
west cache bits at west direction

char_shift

#include "xf_data_analytics/text/editDistance.hpp"
template <int N>
void char_shift (
    char in_char,
    char str [N]
    )

left shift one string toward the LSB char, with feeding the MSB char with given char

Parameters:

in_char input char to fill the MSB location
str input string

left_shift

#include "xf_data_analytics/text/editDistance.hpp"
template <
    int N,
    int BITS
    >
void left_shift (
    ap_uint <BITS> northwest [N],
    ap_uint <BITS> west [N]
    )

circular left shifter, each call will move one char for two input string independently

Parameters:

northwest input string 1
west input string 2

popStack

#include "xf_data_analytics/text/regexVM.hpp"
static void popStack (unsigned int& stkPtr)

Pop one element out of stack.

Parameters:

stkPtr Pointer for last item in stack.

peekStack

#include "xf_data_analytics/text/regexVM.hpp"
static void peekStack (
    ap_uint <54>* stackBuff,
    unsigned int stkPtr,
    ap_uint <54>& dt
    )

Peeking stack data for optimization.

Parameters:

stackBuff Internal stack buffer.
stkPtr Pointer for last item in stack.
dt Collection of stack type, memory id, memory start offset, memory end offset, op address, and string pointer.

split

#include "xf_data_analytics/text/regexVM.hpp"
static void split (
    ap_uint <54> dt,
    ap_uint <6>& stkType,
    ap_uint <16>& memID,
    ap_uint <16>& memStart,
    ap_uint <16>& memEnd,
    ap_uint <16>& opAddr,
    ap_uint <16>& strPtr
    )

Stack data splitter.

Parameters:

dt Collection of stack type, memory id, memory start offset, memory end offset, op address, and string pointer.
stkType Type of current item to be pushed into stack.
memID Current group index.
memStart Start offset address of current capturing group.
memEnd End offset address of current capturing group.
opAddr Instruction address.
strPtr Pointer for current character in input string.

pushStack

#include "xf_data_analytics/text/regexVM.hpp"
static void pushStack (
    ap_uint <54>* stackBuff,
    unsigned int& stkPtr,
    ap_uint <54> dt
    )

Push one element into stack.

Parameters:

stackBuff Internal stack buffer.
stkPtr Pointer for last item in stack.
dt Collection of data to be pushed into stack.

pushStack_opt

#include "xf_data_analytics/text/regexVM.hpp"
static void pushStack_opt (
    ap_uint <54>* stackBuff,
    unsigned int stkPtr,
    ap_uint <54> dt
    )

Push one element into stack without increasing the stack pointer (for optimized regexVM only).

Parameters:

stackBuff Internal stack buffer.
stkPtr Pointer for last item in stack.
dt Collection of data to be pushed into stack.

combine

#include "xf_data_analytics/text/regexVM.hpp"
static void combine (
    ap_uint <54>& dt,
    ap_uint <6> stkType,
    ap_uint <16> memID,
    ap_uint <16> memStart,
    ap_uint <16> memEnd,
    ap_uint <16> opAddr,
    ap_uint <16> strPtr
    )

Stack data combiner.

Parameters:

dt Collection of stack type, memory id, memory start offset, memory end offset, op address, and string pointer.
stkType Type of current item to be pushed into stack.
memID Current group index.
memStart Start offset address of current capturing group.
memEnd End offset address of current capturing group.
opAddr Instruction address.
strPtr Pointer for current character in input string.