api for pom_yang algorithm operations
More...
#include <stdbool.h>
#include <stdlib.h>
#include "../inc/PackedArray.h"
#include "../inc/math_macros.h"
Go to the source code of this file.
api for pom_yang algorithm operations
- Author
- Gavin Guinn (gavin.nosp@m.guin.nosp@m.n1@gm.nosp@m.ail..nosp@m.com)
- Date
- 2021-2-17
- Copyright
- Public Domain (Please credit me; if you find this code useful I would love to hear about your work!)
◆ pomyang_algorithm()
Runs the Pomerance-Yang algorithm.
- Parameters
-
- Returns
- PackedArray* containing the number of preimages for even number upto bound. Free'd by caller.
◆ pomyang_count_kparent()
runs the Pomerance-Yang algorithm and counts occurrence of kparent numbers.
- Parameters
-
- Returns
- uint64_t* buffer of length (UINT8_MAX + 1) with occurrence counts, must be free'd by caller
◆ print_to_file()
void print_to_file |
( |
pomyang_config_t * |
cfg, |
|
|
const char * |
filename, |
|
|
uint64_t * |
count, |
|
|
float |
runtime |
|
) |
| |
Prints Pomerance-Yang algorithm configuration.
- Parameters
-
cfg | Pointer to config struct. |
filename | Name of file to write. |
count | Array of k-parent counts. |
runtime | CPU seconds used. |