Skip to content

Commit 5a764bd

Browse files
committed
Auto-generated commit
1 parent acc0166 commit 5a764bd

7 files changed

Lines changed: 24 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2024-12-24)
7+
## Unreleased (2025-01-03)
88

99
<section class="bug-fixes">
1010

1111
### Bug Fixes
1212

13+
- [`e1296c1`](https://github.com/stdlib-js/stdlib/commit/e1296c1c5634fbcf5e007695391c944fef27e6aa) - update include paths and reorder includes
1314
- [`09483ae`](https://github.com/stdlib-js/stdlib/commit/09483ae5cf6ed8edfce7d64d36a31339bc3e6e06) - update documentation to reflect correct seed range
1415

1516
</section>
@@ -34,6 +35,7 @@ This release closes the following issue:
3435

3536
<details>
3637

38+
- [`e1296c1`](https://github.com/stdlib-js/stdlib/commit/e1296c1c5634fbcf5e007695391c944fef27e6aa) - **fix:** update include paths and reorder includes _(by Athan Reines)_
3739
- [`90e96d0`](https://github.com/stdlib-js/stdlib/commit/90e96d01b7a32ec3b71caf3e5f57528338199a8f) - **chore:** minor clean-up _(by Philipp Burckhardt)_
3840
- [`2777e4b`](https://github.com/stdlib-js/stdlib/commit/2777e4be161869d09406e3b17947d24c64b47af2) - **bench:** resolve lint errors in benchmarks _(by Athan Reines)_
3941
- [`d04dcbd`](https://github.com/stdlib-js/stdlib/commit/d04dcbd6dc3b0bf4a89bd3947d317fa5ff15bb38) - **docs:** remove private annotations in C comments _(by Philipp Burckhardt)_

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Daniel Killenberger <daniel.killenberger@gmail.com>
2727
Daniel Yu <40680511+Daniel777y@users.noreply.github.com>
2828
Debashis Maharana <debashismaharana7854@gmail.com>
2929
Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com>
30+
Dhruv/ <154677013+DhruvArvindSingh@users.noreply.github.com>
3031
Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com>
3132
Dominic Lim <46486515+domlimm@users.noreply.github.com>
3233
Dominik Moritz <domoritz@gmail.com>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ For more information on the project, filing bug reports and feature requests, an
375375

376376
## Copyright
377377

378-
Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
378+
Copyright &copy; 2016-2025. The Stdlib [Authors][stdlib-authors].
379379

380380
</section>
381381

benchmark/c/benchmark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
* limitations under the License.
1717
*/
1818

19+
#include "stdlib/random/base/mt19937.h"
20+
#include "stdlib/random/base/shared.h"
1921
#include <stdlib.h>
2022
#include <stdio.h>
2123
#include <stdint.h>
2224
#include <math.h>
2325
#include <time.h>
2426
#include <sys/time.h>
25-
#include "stdlib/random/base.h"
26-
#include "stdlib/random/base/mt19937.h"
2727

2828
#define NAME "base/mt19937"
2929
#define ITERATIONS 1000000

examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
#include "stdlib/random/base/mt19937.h"
20-
#include "stdlib/random/base.h"
20+
#include "stdlib/random/base/shared.h"
2121
#include <stdlib.h>
2222
#include <stdio.h>
2323
#include <inttypes.h>

include/stdlib/random/base/mt19937.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
#ifndef STDLIB_RANDOM_BASE_MT19937_H
2020
#define STDLIB_RANDOM_BASE_MT19937_H
2121

22-
// Note: keep project includes in alphabetical order...
22+
#include "stdlib/random/base/shared.h"
2323
#include <stdint.h>
24-
#include "stdlib/random/base.h"
2524

2625
/*
2726
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C compiler.

src/main.c

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,11 @@
5555
* [mt19937]: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c
5656
*/
5757

58-
// Note: keep project includes in alphabetical order...
58+
#include "stdlib/random/base/mt19937.h"
59+
#include "stdlib/random/base/shared.h"
5960
#include <stdlib.h>
6061
#include <stdint.h>
6162
#include <string.h>
62-
#include "stdlib/random/base.h"
63-
#include "stdlib/random/base/mt19937.h"
6463

6564
// Forward declarations:
6665
static inline int8_t next( struct BasePRNGObject *obj, uint64_t *out );
@@ -392,11 +391,11 @@ static inline void twist( uint32_t *state, const int32_t N ) {
392391
* @return pointer to a dynamically allocated PRNG or, if unable to allocate memory, a null pointer
393392
*
394393
* @example
394+
* #include "stdlib/random/base/mt19937.h"
395+
* #include "stdlib/random/base/shared.h"
395396
* #include <stdlib.h>
396397
* #include <stdio.h>
397398
* #include <stdint.h>
398-
* #include "stdlib/random/base.h"
399-
* #include "stdlib/random/base/mt19937.h"
400399
*
401400
* // Define a PRNG seed:
402401
* uint32_t seed[] = { 12345 };
@@ -472,11 +471,11 @@ struct BasePRNGObject * stdlib_base_random_mt19937_allocate( const uint32_t *see
472471
* @param obj PRNG object
473472
*
474473
* @example
474+
* #include "stdlib/random/base/mt19937.h"
475+
* #include "stdlib/random/base/shared.h"
475476
* #include <stdlib.h>
476477
* #include <stdio.h>
477478
* #include <stdint.h>
478-
* #include "stdlib/random/base.h"
479-
* #include "stdlib/random/base/mt19937.h"
480479
*
481480
* // Define a PRNG seed:
482481
* uint32_t seed[] = { 12345 };
@@ -527,11 +526,11 @@ void stdlib_base_random_mt19937_free( struct BasePRNGObject *obj ) {
527526
* @return status code
528527
*
529528
* @example
529+
* #include "stdlib/random/base/mt19937.h"
530+
* #include "stdlib/random/base/shared.h"
530531
* #include <stdlib.h>
531532
* #include <stdio.h>
532533
* #include <stdint.h>
533-
* #include "stdlib/random/base.h"
534-
* #include "stdlib/random/base/mt19937.h"
535534
*
536535
* // Define a PRNG seed:
537536
* uint32_t seed1[] = { 12345 };
@@ -596,11 +595,11 @@ int8_t stdlib_base_random_mt19937_seed_length( const struct BasePRNGObject *obj,
596595
* @return status code
597596
*
598597
* @example
598+
* #include "stdlib/random/base/mt19937.h"
599+
* #include "stdlib/random/base/shared.h"
599600
* #include <stdlib.h>
600601
* #include <stdio.h>
601602
* #include <stdint.h>
602-
* #include "stdlib/random/base.h"
603-
* #include "stdlib/random/base/mt19937.h"
604603
*
605604
* // Define a PRNG seed:
606605
* uint32_t seed1[] = { 12345 };
@@ -664,11 +663,11 @@ int8_t stdlib_base_random_mt19937_seed( const struct BasePRNGObject *obj, uint32
664663
* @return pointer to a copy of the PRNG's internal state or, if unable to allocate memory, a null pointer
665664
*
666665
* @example
666+
* #include "stdlib/random/base/mt19937.h"
667+
* #include "stdlib/random/base/shared.h"
667668
* #include <stdlib.h>
668669
* #include <stdio.h>
669670
* #include <stdint.h>
670-
* #include "stdlib/random/base.h"
671-
* #include "stdlib/random/base/mt19937.h"
672671
*
673672
* // Define a PRNG seed:
674673
* uint32_t seed[] = { 12345 };
@@ -695,8 +694,8 @@ int8_t stdlib_base_random_mt19937_seed( const struct BasePRNGObject *obj, uint32
695694
* free( state );
696695
*/
697696
void * stdlib_base_random_mt19937_state( const struct BasePRNGObject *obj ) {
697+
const stdlib_base_random_mt19937_state_t *so;
698698
stdlib_base_random_mt19937_state_t *state;
699-
stdlib_base_random_mt19937_state_t *so;
700699
uint64_t nbytes;
701700
uint32_t *seed;
702701
if ( obj == NULL || obj->prng != &mt19937_prng ) {
@@ -735,11 +734,11 @@ void * stdlib_base_random_mt19937_state( const struct BasePRNGObject *obj ) {
735734
* @return status code
736735
*
737736
* @example
737+
* #include "stdlib/random/base/mt19937.h"
738+
* #include "stdlib/random/base/shared.h"
738739
* #include <stdlib.h>
739740
* #include <stdio.h>
740741
* #include <stdint.h>
741-
* #include "stdlib/random/base.h"
742-
* #include "stdlib/random/base/mt19937.h"
743742
*
744743
* // Define a PRNG seed:
745744
* uint32_t seed[] = { 12345 };

0 commit comments

Comments
 (0)