Skip to content

Commit

Permalink
Merge branch 'loadlib'
Browse files Browse the repository at this point in the history
  • Loading branch information
JulStrat committed Jul 7, 2020
2 parents 9c7fefc + d6c23d7 commit f78bc33
Show file tree
Hide file tree
Showing 20 changed files with 1,910 additions and 154 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@

Pascal bindings for [PrimeSieve](https://github.com/kimwalisch/primesieve) library.

# Requirements
## Pascal API documentation

https://julstrat.github.io/primesieve-pas/

Documentation generated with [PasDoc](https://github.com/pasdoc/pasdoc).

## Requirements

Install ```primesieve``` library.

- Ubuntu - ```sudo apt install libprimesieve-dev```.
- MacOS - ```brew install primesieve```.
- Windows - you can use [libprimesieve.dll](https://github.com/JulStrat/primesieve-pas/tree/loadlib/libprimesieve).
- Windows - you can use [libprimesieve.dll](https://github.com/JulStrat/primesieve-pas/tree/loadlib/libprimesieve) built with MinGW.
- Or [build](https://github.com/kimwalisch/primesieve/blob/master/BUILD.md) library from source.

# Usage
## Usage
```
(** @example store_primes_in_array.pas
* Store primes in a array. *)
Expand Down
28 changes: 28 additions & 0 deletions docs/AllClasses.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>primesieve-pas: All Classes, Interfaces, Objects and Records</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.15.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>primesieve-pas</h2><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<h1 class="allitems">All Classes, Interfaces, Objects and Records</h1>
<table class="itemstable wide_list">
<tr class="listheader">
<th class="itemname">Name</th>
<th class="itemunit">Unit</th>
<th class="itemdesc">Description</th>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.primesieve_iterator.html">primesieve_iterator</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>&nbsp;</p></td>
</tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://github.com/pasdoc/pasdoc/wiki">PasDoc 0.15.0</a>. </em>
</span>
</td></tr></table></body></html>
118 changes: 118 additions & 0 deletions docs/AllConstants.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>primesieve-pas: All Constants</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.15.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>primesieve-pas</h2><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<h1 class="allitems">All Constants</h1>
<table class="itemstable wide_list">
<tr class="listheader">
<th class="itemname">Name</th>
<th class="itemunit">Unit</th>
<th class="itemdesc">Description</th>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#INT16_PRIMES">INT16_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of int16_t type</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#INT32_PRIMES">INT32_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of int32_t type</p></td>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#INT64_PRIMES">INT64_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of int64_t type</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#INT_PRIMES">INT_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of int type</p></td>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#LONGLONG_PRIMES">LONGLONG_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of long long type</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#LONG_PRIMES">LONG_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of long type</p></td>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#SHORT_PRIMES">SHORT_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of short type</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#UINT16_PRIMES">UINT16_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of uint16_t type</p></td>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#UINT32_PRIMES">UINT32_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of uint32_t type</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#UINT64_PRIMES">UINT64_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of uint64_t type</p></td>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#UINT_PRIMES">UINT_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of unsigned int type</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#ULONGLONG_PRIMES">ULONGLONG_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of unsigned long long type</p></td>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#ULONG_PRIMES">ULONG_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of unsigned long type</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#USHORT_PRIMES">USHORT_PRIMES</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Generate primes of unsigned short type</p></td>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#_PRIMESIEVE_ERROR">_PRIMESIEVE_ERROR</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>primesieve functions return PRIMESIEVE_ERROR (UINT64_MAX) if any error occurs.</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#_PRIMESIEVE_PAS_VERSION">_PRIMESIEVE_PAS_VERSION</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>&nbsp;</p></td>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#_PRIMESIEVE_VERSION">_PRIMESIEVE_VERSION</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>&nbsp;</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#_PRIMESIEVE_VERSION_MAJOR">_PRIMESIEVE_VERSION_MAJOR</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>&nbsp;</p></td>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#_PRIMESIEVE_VERSION_MINOR">_PRIMESIEVE_VERSION_MINOR</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>&nbsp;</p></td>
</tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://github.com/pasdoc/pasdoc/wiki">PasDoc 0.15.0</a>. </em>
</span>
</td></tr></table></body></html>
47 changes: 47 additions & 0 deletions docs/AllFunctions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>primesieve-pas: All Functions and Procedures</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.15.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<table class="container"><tr><td class="navigation">
<h2>primesieve-pas</h2><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p></td><td class="content">
<h1 class="allitems">All Functions and Procedures</h1>
<table class="itemstable wide_list">
<tr class="listheader">
<th class="itemname">Name</th>
<th class="itemunit">Unit</th>
<th class="itemdesc">Description</th>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#load_libprimesieve">load_libprimesieve</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Loads primesieve library.</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#primesieve_next_prime">primesieve_next_prime</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Get the next prime.

<p>Returns UINT64_MAX if next prime &gt; 2&circ;64.</p></td>
</tr>
<tr class="list">
<td class="itemname"><a class="bold" href="primesieve.html#primesieve_prev_prime">primesieve_prev_prime</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Get the previous prime.

<p>primesieve_prev_prime(n) returns 0 for n &lt;= 2. Note that primesieve_next_prime() runs up to 2x faster than primesieve_prev_prime(). Hence if the same algorithm can be written using either primesieve_prev_prime() or primesieve_next_prime() it is preferable to use primesieve_next_prime().</p></td>
</tr>
<tr class="list2">
<td class="itemname"><a class="bold" href="primesieve.html#unload_libprimesieve">unload_libprimesieve</a></td>
<td class="itemunit"><a class="bold" href="primesieve.html">primesieve</a></td>
<td class="itemdesc"><p>Unoads primesieve library.</p></td>
</tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://github.com/pasdoc/pasdoc/wiki">PasDoc 0.15.0</a>. </em>
</span>
</td></tr></table></body></html>
Loading

0 comments on commit f78bc33

Please sign in to comment.