Skip to content

[OPENMP] Implement text chunking and parallel search with OpenMP #5

Description

@hubertwojcik

Goal

Parallelize the Aho-Corasick search phase using OpenMP by dividing the input text into equal chunks processed concurrently by multiple threads.

Tasks

  • Divide text into N chunks (N = omp_get_max_threads())
  • Each thread runs the sequential search on its assigned chunk
  • Merge per-thread match lists into a single result, adjusting offsets
  • Add CLI flag --threads N to control thread count
  • Verify correctness: results must match sequential baseline on all test inputs

Acceptance Criteria

  • Match output identical to sequential baseline (excluding boundary matches — handled in next issue)
  • Speedup measured and logged for 2, 4, 8, 10-core configurations on M4 Pro
  • No data races detected under ThreadSanitizer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    algorithmCore algorithm implementation: trie, failure links, automatonopenmpOpenMP shared-memory parallelism

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions