Commit Graph

89 Commits

Author SHA1 Message Date
Nicolás A. Ortega
a3ec19d47c
Cleaned the code. 2017-02-02 19:53:29 +01:00
Nicolás A. Ortega
22239ec644
Preparing for v1.0 release. 2017-02-02 10:46:34 +01:00
Nicolás A. Ortega
22278999e7
Fixed algorithm problem. 2017-02-02 10:35:43 +01:00
Nicolás A. Ortega
a5b68282b3
Cancel if `primes.list[i] >= numRoot'.
It has been solved!!!
2017-02-01 23:12:23 +01:00
Nicolás A. Ortega
b9cafadf8e
Parallelized, but needs algorithm optimization. 2017-02-01 19:36:05 +01:00
Nicolás A. Ortega
32076a67cd
Remove parallelization code to start anew. 2017-02-01 17:18:03 +01:00
Nicolás A. Ortega
9673a4da57
Use shared as default. 2017-01-31 22:24:06 +01:00
Nicolás A. Ortega
76936644cd
Almost completely parallelized. 2017-01-31 19:39:35 +01:00
Nicolás A. Ortega
a6ecea514f Restrict will no longer apply to `addToList' 2017-01-17 00:11:51 +01:00
Nicolás A. Ortega
22c7702cf0
We only need to test up to the sqrt(num). 2017-01-01 17:05:25 +01:00
Nicolás A. Ortega
f8726497a4
Don't test for divisibility by 2.
We skip all even numbers, so we can skip 2, this also means giving 3 as
a given.
2016-12-30 17:57:28 +01:00
Nicolás A. Ortega
3e902efd18
Small cleanup. 2016-12-30 17:51:48 +01:00
Nicolás A. Ortega
3246870b75
Better help information. 2016-12-28 14:43:17 +01:00
Nicolás A. Ortega
09166efe89
Small improvements and optimizations.
All error catching is now in `main.c' so we can neatly release memory as
well as adding the `restrict' optimizer to the `addToList()' function.
2016-12-28 00:30:31 +01:00
Nicolás A. Ortega
8b35c5aea3
Fixed title for v0.7 2016-12-27 22:53:22 +01:00
Nicolás A. Ortega
1264edc8c8
We're going to release v0.7 first. 2016-12-27 22:52:06 +01:00
Nicolás A. Ortega
63aa8e14cb
Fixed the damn exporting for once.
Now I'm checking to see if it was actually worth a damn to have raw
files in the first place (-_-;).
2016-12-27 22:34:34 +01:00
Nicolás A. Ortega
f2eb3e869e
Fixed the file issue...
but the export issue still remains -_- I hate seg faults.
2016-12-27 21:47:16 +01:00
Nicolás A. Ortega
a695cce709
Moving shit to files.c 2016-12-27 21:31:24 +01:00
Nicolás A. Ortega
096cb2eb16
Moving file I/O to own file. Everything works except export. 2016-12-26 18:50:51 +01:00
Nicolás A. Ortega
1783b16024
Use raw I/O for file saving. 2016-12-26 16:51:51 +01:00
Nicolás A. Ortega
c602b5fe1b
Added OpenMP to CI. 2016-12-26 16:35:52 +01:00
Nicolás A. Ortega
6b2411e860
Now using OpenMP for parallel programming and next version is v1.0 2016-12-26 15:57:28 +01:00
Nicolás A. Ortega
6c2f96416b
Read and write primes to and from file. 2016-12-26 15:56:56 +01:00
Nicolás A. Ortega
fa3f2dd2b1
New goal before paralellization 2016-12-22 16:31:24 +01:00
Nicolás A. Ortega
591ee92971
Cast is unnecessary in C. 2016-12-15 15:16:04 +01:00
Nicolás A. Ortega
803c6f9e06
`size_t' makes this safeguard unnecessary. 2016-12-14 23:42:20 +01:00
Nicolás A. Ortega
4390fca3ef
Added comments. 2016-12-14 23:38:22 +01:00
Nicolás A. Ortega
2629c12f1a
Set goal for v1.0 2016-12-14 22:26:43 +01:00
Nicolás A. Ortega
af79d206d3
Added entry for v0.6 2016-12-14 20:12:46 +01:00
Nicolás A. Ortega
4b034ce5e3
Print more info about the file writing. 2016-12-14 19:34:50 +01:00
Nicolás A. Ortega
f146dbf11c
Able to save found primes to a file afterwards. 2016-12-14 19:28:28 +01:00
Nicolás A. Ortega
656fee720e
Allow user to choose base. 2016-12-14 19:06:33 +01:00
Nicolás A. Ortega
5e45656e1a
Forgot that from the switch to C. 2016-12-14 17:58:12 +01:00
Nicolás A. Ortega
c522196d66
Argument parsing! 2016-12-14 17:52:52 +01:00
Nicolás A. Ortega
b5dcadce19
Added new goal for v0.5 2016-12-14 17:31:36 +01:00
Nicolás A. Ortega
003b94dcdb
Added some more useful docs and stuff. 2016-12-14 16:14:58 +01:00
Nicolás A. Ortega
fcee95da17
Fixed something from the description 2016-12-14 16:14:37 +01:00
Nicolás A. Ortega
43620ba2d3
Enable documentation. 2016-12-14 16:08:11 +01:00
Nicolás A. Ortega
9f1160242a
Removed warning (no longer necessary). 2016-12-14 15:56:28 +01:00
Nicolás A. Ortega
b414bff9dc
Minor optimization. 2016-12-14 15:55:39 +01:00
Nicolás A. Ortega
d8c81b172b
Print some fun information at the end. 2016-12-14 15:29:06 +01:00
Nicolás A. Ortega
c2f0fb0ffd
Defining changes for v0.5 2016-12-14 15:05:24 +01:00
Nicolás A. Ortega
5bbac132bc
Use size_t, which is better for arrays of very large sizes. 2016-12-14 14:13:32 +01:00
Nicolás A. Ortega
2a3e97f4bc
Prepare version number so I don't forget later. 2016-12-13 18:09:05 +01:00
Nicolás A. Ortega
06d5ddb0cc
Fixed problem with the algorithm.
If it's equal to half then we want to check if it's divisible, since if
it's half then it is NOT prime.
2016-12-13 18:05:02 +01:00
Nicolás A. Ortega
a9019291c2
New goal for v0.4 2016-12-13 17:51:48 +01:00
Nicolás A. Ortega
5aa0b333c0
Made a fix, because previously it was not measuring primes. 2016-12-13 16:32:10 +01:00
Nicolás A. Ortega
3110c74174
Added entry about `restrict' keyword. 2016-12-13 16:12:31 +01:00
Nicolás A. Ortega
a5ce845c68
`restrict' keyword must be in declaration. 2016-12-13 16:12:03 +01:00