sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
random_util.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 The University of Manchester
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
19
28
29#include <random.h>
30
31static mars_kiss64_seed_t seed = {123456789, 234567891, 345678912, 456789123};
32
33static inline int32_t mars_kiss_fixed_point(void) {
34 return (int32_t) (mars_kiss64_seed(seed) & (STDP_FIXED_POINT_ONE - 1));
35}
uint32_t mars_kiss64_seed(mars_kiss64_seed_t seed)
uint32_t mars_kiss64_seed_t[4]
static mars_kiss64_seed_t seed
YUCK copy and pasted RNG to allow inlining and also to avoid horrific executable bloat.
Definition random_util.h:31
#define STDP_FIXED_POINT_ONE
The number 1.0 in the fixed point math used by STDP.