<commit_before>///
/// @file   primesieve-api.cpp
/// @brief  This file contains convenience functions for the
///         most useful methods of the PrimeSieve and
///         ParallelPrimeSieve classes.
///
/// Copyright (C) 2013 <NAME>, <<EMAIL>>
///
/// This file is distributed under the BSD License. See the COPYING
/// file in the top level directory.
///

#include <primesieve/soe/PrimeSieve.h>
#include <primesieve/soe/ParallelPrimeSieve.h>
#include <primesieve/soe/PrimeSieveCallback.h>
#include <primesieve/soe/PrimeFinder.h>

#include <stdint.h>
#include <string>

namespace primesieve
{

void callback_primes(uint32_t start, uint32_t stop, void (*callback)(uint32_t))
{
  PrimeSieve ps;
  ps.generatePrimes(start, stop, callback);
}

void callback_primes(uint64_t start, uint64_t stop, void (*callback)(uint64_t))
{
  PrimeSieve ps;
  ps.generatePrimes(start, stop, callback);
}

void callback_primes(uint32_t start, uint32_t stop, PrimeSieveCallback<uint32_t>* callback)
{
  PrimeSieve ps;
  ps.generatePrimes(start, stop, callback);
}

void callback_primes(uint64_t start, uint64_t stop, PrimeSieveCallback<uint64_t>* callback)
{
  PrimeSieve ps;
  ps.generatePrimes(start, stop, callback);
}

uint64_t count_primes(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countPrimes(start, stop);
}

uint64_t count_twins(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countTwins(start, stop);
}

uint64_t count_triplets(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countTriplets(start, stop);
}

uint64_t count_quadruplets(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countQuadruplets(start, stop);
}

uint64_t count_quintuplets(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countQuintuplets(start, stop);
}

uint64_t count_sextuplets(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countSextuplets(start, stop);
}

uint64_t count_septuplets(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countSeptuplets(start, stop);
}

uint64_t max_stop()
{
  return soe::PrimeFinder::getMaxStop();
}

std::string max_stop_string()
{
  return soe::PrimeFinder::getMaxStopString();
}

uint64_t nth_prime(uint64_t n, uint64_t start)
{
  PrimeSieve ps;
  return ps.nthPrime(n, start);
}

void parallel_callback_primes(uint32_t start, uint32_t stop, void (*callback)(uint32_t), int threads)
{
  ParallelPrimeSieve pps;
  pps.setNumThreads(threads);
  pps.generatePrimes(start, stop, callback);
}

void parallel_callback_primes(uint64_t start, uint64_t stop, void (*callback)(uint64_t), int threads)
{
  ParallelPrimeSieve pps;
  pps.setNumThreads(threads);
  pps.generatePrimes(start, stop, callback);
}

void parallel_callback_primes(uint64_t start, uint64_t stop, void (*callback)(uint64_t, int), int threads)
{
  ParallelPrimeSieve pps;
  pps.setNumThreads(threads);
  pps.generatePrimes(start, stop, callback);
}

void parallel_callback_primes(uint32_t start, uint32_t stop, PrimeSieveCallback<uint32_t>* callback, int threads)
{
  ParallelPrimeSieve pps;
  pps.setNumThreads(threads);
  pps.generatePrimes(start, stop, callback);
}

void parallel_callback_primes(uint64_t start, uint64_t stop, PrimeSieveCallback<uint64_t>* callback, int threads)
{<commit_msg>Removed 32-bit functions<commit_after>///
/// @file   primesieve-api.cpp
/// @brief  This file contains convenience functions for the
///         most useful methods of the PrimeSieve and
///         ParallelPrimeSieve classes.
///
/// Copyright (C) 2013 <NAME>, <<EMAIL>>
///
/// This file is distributed under the BSD License. See the COPYING
/// file in the top level directory.
///

#include <primesieve/soe/PrimeSieve.h>
#include <primesieve/soe/ParallelPrimeSieve.h>
#include <primesieve/soe/PrimeSieveCallback.h>
#include <primesieve/soe/PrimeFinder.h>

#include <stdint.h>
#include <string>

namespace primesieve
{

void callback_primes(uint64_t start, uint64_t stop, void (*callback)(uint64_t))
{
  PrimeSieve ps;
  ps.generatePrimes(start, stop, callback);
}

void callback_primes(uint64_t start, uint64_t stop, PrimeSieveCallback<uint64_t>* callback)
{
  PrimeSieve ps;
  ps.generatePrimes(start, stop, callback);
}

uint64_t count_primes(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countPrimes(start, stop);
}

uint64_t count_twins(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countTwins(start, stop);
}

uint64_t count_triplets(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countTriplets(start, stop);
}

uint64_t count_quadruplets(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countQuadruplets(start, stop);
}

uint64_t count_quintuplets(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countQuintuplets(start, stop);
}

uint64_t count_sextuplets(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countSextuplets(start, stop);
}

uint64_t count_septuplets(uint64_t start, uint64_t stop)
{
  PrimeSieve ps;
  return ps.countSeptuplets(start, stop);
}

uint64_t max_stop()
{
  return soe::PrimeFinder::getMaxStop();
}

std::string max_stop_string()
{
  return soe::PrimeFinder::getMaxStopString();
}

uint64_t nth_prime(uint64_t n, uint64_t start)
{
  PrimeSieve ps;
  return ps.nthPrime(n, start);
}

void parallel_callback_primes(uint64_t start, uint64_t stop, void (*callback)(uint64_t), int threads)
{
  ParallelPrimeSieve pps;
  pps.setNumThreads(threads);
  pps.generatePrimes(start, stop, callback);
}

void parallel_callback_primes(uint64_t start, uint64_t stop, void (*callback)(uint64_t, int), int threads)
{
  ParallelPrimeSieve pps;
  pps.setNumThreads(threads);
  pps.generatePrimes(start, stop, callback);
}

void parallel_callback_primes(uint64_t start, uint64_t stop, PrimeSieveCallback<uint64_t>* callback, int threads)
{
{'fraction_non_alphanumeric': 0.11214470284237726, 'fraction_numerical': 0.03341946597760551, 'mean_word_length': 5.408388520971302, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4981175', 'n_tokens_mistral': 2292, 'n_tokens_neox': 2151, 'n_words': 472}