PandA-2024.02
examples
MachSuite
MachSuite
kmp
kmp
kmp.h
Go to the documentation of this file.
1
/*
2
Implementation based on http://www-igm.univ-mlv.fr/~lecroq/string/node8.html
3
*/
4
5
#include <stdlib.h>
6
#include <stdio.h>
7
#include <stdint.h>
8
#include "support.h"
9
10
#define PATTERN_SIZE 4
11
#define STRING_SIZE (32411)
12
13
int
kmp
(
char
pattern[
PATTERN_SIZE
],
char
input
[
STRING_SIZE
], int32_t kmpNext[PATTERN_SIZE], int32_t n_matches[1]);
15
// Test harness interface code.
16
17
struct
bench_args_t
{
18
char
pattern
[
PATTERN_SIZE
];
19
char
input
[
STRING_SIZE
];
20
int32_t
kmpNext
[
PATTERN_SIZE
];
21
int32_t
n_matches
[1];
22
};
bench_args_t::kmpNext
int32_t kmpNext[PATTERN_SIZE]
Definition:
kmp.h:20
STRING_SIZE
#define STRING_SIZE
Definition:
kmp.h:11
input
int input[SIZE]
Definition:
hash.h:1
PATTERN_SIZE
#define PATTERN_SIZE
Definition:
kmp.h:10
bench_args_t::n_matches
int32_t n_matches[1]
Definition:
kmp.h:21
bench_args_t::pattern
char pattern[PATTERN_SIZE]
Definition:
kmp.h:18
bench_args_t::input
char input[STRING_SIZE]
Definition:
kmp.h:19
kmp
int kmp(char pattern[PATTERN_SIZE], char input[STRING_SIZE], int32_t kmpNext[PATTERN_SIZE], int32_t n_matches[1])
Definition:
kmp.c:24
bench_args_t
Definition:
aes.h:18
Generated on Mon Feb 12 2024 13:02:50 for PandA-2024.02 by
1.8.13