Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sfmt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
toki
components
sfmt
Commits
2efe70af
Commit
2efe70af
authored
4 years ago
by
Ulrich Huber
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Remove non-functional asserts for now
parent
eaa89daf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/sfmt/SFMT.h
+2
-2
2 additions, 2 deletions
include/sfmt/SFMT.h
src/SFMT.c
+5
-5
5 additions, 5 deletions
src/SFMT.c
with
7 additions
and
7 deletions
include/sfmt/SFMT.h
+
2
−
2
View file @
2efe70af
...
...
@@ -39,7 +39,7 @@ extern "C" {
#endif
#include
<stdio.h>
#include
<assert.h>
//
#include <assert.h>
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
#include
<inttypes.h>
...
...
@@ -158,7 +158,7 @@ inline static uint64_t sfmt_genrand_uint64(sfmt_t * sfmt) {
uint64_t
r
;
#endif
uint64_t
*
psfmt64
=
&
sfmt
->
state
[
0
].
u64
[
0
];
assert
(
sfmt
->
idx
%
2
==
0
);
//
assert(sfmt->idx % 2 == 0);
if
(
sfmt
->
idx
>=
SFMT_N32
)
{
sfmt_gen_rand_all
(
sfmt
);
...
...
This diff is collapsed.
Click to expand it.
src/SFMT.c
+
5
−
5
View file @
2efe70af
...
...
@@ -22,7 +22,7 @@ extern "C" {
#endif
#include
<string.h>
#include
<assert.h>
//
#include <assert.h>
#include
<sfmt/SFMT.h>
#include
<sfmt/SFMT-params.h>
#include
<sfmt/SFMT-common.h>
...
...
@@ -287,9 +287,9 @@ void sfmt_gen_rand_all(sfmt_t * sfmt) {
* returns the pointer to the aligned memory block.
*/
void
sfmt_fill_array32
(
sfmt_t
*
sfmt
,
uint32_t
*
array
,
int
size
)
{
assert
(
sfmt
->
idx
==
SFMT_N32
);
/*
assert(sfmt->idx == SFMT_N32);
assert(size % 4 == 0);
assert
(
size
>=
SFMT_N32
);
assert(size >= SFMT_N32);
*/
gen_rand_array
(
sfmt
,
(
w128_t
*
)
array
,
size
/
4
);
sfmt
->
idx
=
SFMT_N32
;
...
...
@@ -323,9 +323,9 @@ void sfmt_fill_array32(sfmt_t * sfmt, uint32_t *array, int size) {
* returns the pointer to the aligned memory block.
*/
void
sfmt_fill_array64
(
sfmt_t
*
sfmt
,
uint64_t
*
array
,
int
size
)
{
assert
(
sfmt
->
idx
==
SFMT_N32
);
/*
assert(sfmt->idx == SFMT_N32);
assert(size % 2 == 0);
assert
(
size
>=
SFMT_N64
);
assert(size >= SFMT_N64);
*/
gen_rand_array
(
sfmt
,
(
w128_t
*
)
array
,
size
/
2
);
sfmt
->
idx
=
SFMT_N32
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment