<commit_before>// This file is distributed under the MIT license.
// See the LICENSE file for details.

//-------------------------------------------------------------------------------------------------
// This file is based on <NAME>'s book "Ray Tracing in One Weekend"
//

#include <chrono>
#include <cstdlib>
#include <iostream>
#include <ostream>
#include <memory>

#include <GL/glew.h>

#include <cuda_runtime_api.h>

#include <thrust/device_vector.h>

#include <Support/CmdLine.h>
#include <Support/CmdLineUtil.h>

#include <visionaray/detail/platform.h>

#include <visionaray/gl/debug_callback.h>
#include <visionaray/gl/handle.h>
#include <visionaray/gl/program.h>
#include <visionaray/gl/shader.h>

#include <visionaray/bvh.h>
#include <visionaray/pixel_unpack_buffer_rt.h>
#include <visionaray/generic_material.h>
#include <visionaray/kernels.h>
#include <visionaray/material.h>
#include <visionaray/matrix_camera.h>
#include <visionaray/pinhole_camera.h>
#include <visionaray/scheduler.h>

#include <common/manip/arcball_manipulator.h>
#include <common/manip/pan_manipulator.h>
#include <common/manip/zoom_manipulator.h>
#include <common/png_image.h>
#include <common/viewer_glut.h>

#ifdef _WIN32

//-------------------------------------------------------------------------------------------------
// https://pubs.opengroup.org/onlinepubs/007908799/xsh/drand48.html
//

double drand48()
{
    constexpr static uint64_t m = 1ULL<<48;
    constexpr static uint64_t a = 0x5DEECE66DULL;
    constexpr static uint64_t c = 0xBULL;
    thread_local static uint64_t x = 0;

    x = (a * x + c) & (m - 1ULL);

    return static_cast<double>(x) / m;
}<commit_msg>compile fix<commit_after>// This file is distributed under the MIT license.
// See the LICENSE file for details.

//-------------------------------------------------------------------------------------------------
// This file is based on <NAME>'s book "Ray Tracing in One Weekend"
//

#include <chrono>
#include <cstdlib>
#include <iostream>
#include <ostream>
#include <memory>

#include <GL/glew.h>

#include <cuda_runtime_api.h>

#include <thrust/device_vector.h>

#include <Support/CmdLine.h>
#include <Support/CmdLineUtil.h>

#include <visionaray/detail/platform.h>

#include <visionaray/gl/handle.h>
#include <visionaray/gl/program.h>
#include <visionaray/gl/shader.h>

#include <visionaray/bvh.h>
#include <visionaray/pixel_unpack_buffer_rt.h>
#include <visionaray/generic_material.h>
#include <visionaray/kernels.h>
#include <visionaray/material.h>
#include <visionaray/matrix_camera.h>
#include <visionaray/pinhole_camera.h>
#include <visionaray/scheduler.h>

#include <common/manip/arcball_manipulator.h>
#include <common/manip/pan_manipulator.h>
#include <common/manip/zoom_manipulator.h>
#include <common/gl_debug_callback.h>
#include <common/png_image.h>
#include <common/viewer_glut.h>

#ifdef _WIN32

//-------------------------------------------------------------------------------------------------
// https://pubs.opengroup.org/onlinepubs/007908799/xsh/drand48.html
//

double drand48()
{
    constexpr static uint64_t m = 1ULL<<48;
    constexpr static uint64_t a = 0x5DEECE66DULL;
    constexpr static uint64_t c = 0xBULL;
    thread_local static uint64_t x = 0;

    x = (a * x + c) & (m - 1ULL);

    return static_cast<double>(x) / m;
}
{'fraction_non_alphanumeric': 0.23902585688514733, 'fraction_numerical': 0.01984365604329525, 'mean_word_length': 2.692563817980022, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 63, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '506272', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1138, 'n_words': 235}