Aliquot Sequence Research  2.0
Compute properties of the sum-of-proper-divisors function.
All Data Structures Files Functions Variables Enumerations Macros Pages
pomyang_kparent.h
Go to the documentation of this file.
1 
11 #ifndef POMYANG_KPARENT_INC_POMYANG_KPARENT_H_
12 #define POMYANG_KPARENT_INC_POMYANG_KPARENT_H_
13 
14 #include <stdbool.h>
15 #include <stdlib.h>
16 
17 #include "../inc/PackedArray.h"
18 #include "../inc/math_macros.h"
19 
46 typedef struct {
48  size_t bound;
49  size_t seg_len;
50  size_t num_locks;
51  size_t num_threads;
52  bool est_heap;
53  bool quiet;
55 
63 
70 uint64_t *pomyang_count_kparent(const pomyang_config_t *cfg);
71 
80 void print_to_file(pomyang_config_t *cfg, const char *filename, uint64_t *count, float runtime);
81 #endif // POMYANG_KPARENT_INC_POMYANG_KPARENT_H_
pomyang_config_t::est_heap
bool est_heap
Definition: pomyang_kparent.h:52
pomyang_config_t::seg_len
size_t seg_len
Definition: pomyang_kparent.h:49
pomyang_config_t::num_locks
size_t num_locks
Definition: pomyang_kparent.h:50
print_to_file
void print_to_file(pomyang_config_t *cfg, const char *filename, uint64_t *count, float runtime)
Prints Pomerance-Yang algorithm configuration.
Definition: pomyang_kparent.c:162
pomyang_config_t::bound
size_t bound
Definition: pomyang_kparent.h:48
pomyang_config_t::preimage_count_bits
size_t preimage_count_bits
Definition: pomyang_kparent.h:47
PackedArray
PackedArray handle.
Definition: PackedArray.h:74
pomyang_count_kparent
uint64_t * pomyang_count_kparent(const pomyang_config_t *cfg)
runs the Pomerance-Yang algorithm and counts occurrence of kparent numbers.
Definition: pomyang_kparent.c:154
pomyang_config_t
Configure the Pomerance-Yang algorithm.
Definition: pomyang_kparent.h:46
pomyang_config_t::num_threads
size_t num_threads
Definition: pomyang_kparent.h:51
pomyang_config_t::quiet
bool quiet
Definition: pomyang_kparent.h:53
pomyang_algorithm
PackedArray * pomyang_algorithm(const pomyang_config_t *cfg)
Runs the Pomerance-Yang algorithm.
Definition: pomyang_kparent.c:94