spla
Loading...
Searching...
No Matches
auto_common_api.hpp
Go to the documentation of this file.
1
2// Copyright (c) 2021 - 2023 SparseLinearAlgebra
3// Autogenerated file, do not modify
5
6#pragma once
7
8static const char source_common_api[] = R"(
9
10
11uint random_gen_java(ulong seed) {
12 seed = (seed * 0x5DEECE66DL + 0xBL) & ((1L << 48L) - 1);
13 return seed >> 16;
14}
15
16int random_int(ulong seed) {
17 return random_gen_java(seed);
18}
19
20uint random_uint(ulong seed) {
21 return random_gen_java(seed);
22}
23
24float random_float(ulong seed) {
25 float ptr;
26 return fract(sin(((float) random_uint(seed)) * 112.9898f) * 43758.5453f, &ptr);
27}
28
29uint fasu(float v) {
30 return *((uint*) &v);
31}
32)";