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