<commit_before>#pragma once

#include <cuda.h>

#  define CUDA_SAFE_CALL_NO_SYNC( call) do {                                 \
    cudaError err = call;                                                    \
    if( cudaSuccess != err) {                                                \
        fprintf(stderr, "Cuda error in file '%s' in line %i : %s.\n",        \
                __FILE__, __LINE__, cudaGetErrorString( err) );              \
        exit(EXIT_FAILURE);                                                  \
    } } while (0)

#  define CUDA_SAFE_CALL( call) do {                                         \
    CUDA_SAFE_CALL_NO_SYNC(call);                                            \
    cudaError err = cudaThreadSynchronize();                                 \
    if( cudaSuccess != err) {                                                \
        fprintf(stderr, "Cuda error in file '%s' in line %i : %s.\n",        \
                __FILE__, __LINE__, cudaGetErrorString( err) );              \
        exit(EXIT_FAILURE);                                                  \
    } } while (0)

class timer
{
    cudaEvent_t _start;
    cudaEvent_t _end;

    public:
    timer()
    {
        CUDA_SAFE_CALL(cudaEventCreate(&_start));
        CUDA_SAFE_CALL(cudaEventCreate(&_end));
    }

    ~timer()
    {
        CUDA_SAFE_CALL(cudaEventDestroy(_start));
        CUDA_SAFE_CALL(cudaEventDestroy(_end));
    }

    void start()<commit_msg>Remove use of CUDA RT deprecated functions from Thrust<commit_after>#pragma once

#include <cuda.h>

#  define CUDA_SAFE_CALL_NO_SYNC( call) do {                                 \
    cudaError err = call;                                                    \
    if( cudaSuccess != err) {                                                \
        fprintf(stderr, "Cuda error in file '%s' in line %i : %s.\n",        \
                __FILE__, __LINE__, cudaGetErrorString( err) );              \
        exit(EXIT_FAILURE);                                                  \
    } } while (0)

#  define CUDA_SAFE_CALL( call) do {                                         \
    CUDA_SAFE_CALL_NO_SYNC(call);                                            \
    cudaError err = cudaDeviceSynchronize();                                 \
    if( cudaSuccess != err) {                                                \
        fprintf(stderr, "Cuda error in file '%s' in line %i : %s.\n",        \
                __FILE__, __LINE__, cudaGetErrorString( err) );              \
        exit(EXIT_FAILURE);                                                  \
    } } while (0)

class timer
{
    cudaEvent_t _start;
    cudaEvent_t _end;

    public:
    timer()
    {
        CUDA_SAFE_CALL(cudaEventCreate(&_start));
        CUDA_SAFE_CALL(cudaEventCreate(&_end));
    }

    ~timer()
    {
        CUDA_SAFE_CALL(cudaEventDestroy(_start));
        CUDA_SAFE_CALL(cudaEventDestroy(_end));
    }

    void start()
{'fraction_non_alphanumeric': 0.09247384407694904, 'fraction_numerical': 0.0013499831252109348, 'mean_word_length': 1.0176991150442478, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 30, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5364907', 'n_tokens_mistral': 803, 'n_tokens_neox': 792, 'n_words': 155}