<commit_before>#ifndef CNN_GPU_FUNCTORS_H
#define CNN_GPU_FUNCTORS_H

#include <cstdint>

#if HAVE_CUDA
#define CNN_DEVICE_FUNC __device__
#define CNN_DEVICE_MIN -1.175494351e-38f
#else
#include <boost/math/special_functions/digamma.hpp>
#define CNN_DEVICE_FUNC
#define CNN_DEVICE_MIN std::numeric_limits<float>::min()
#endif

// these functions are used both in CPU and in GPU computation
// this file may be compiled with NVCC or a standard C++ tool.
// if you need a new elementwise (nullary, unary, binary...)
// functor, this is the place for it
//
// note: also see xfunctors.h - functors implemented there can
// use Eigen's internal support for vectorized operations which
// can give faster performance on some hardware

#define cast_uint32_t static_cast<uint32_t>

// THIS CODE IS BROKEN- sometimes it returns NaN
// it is commented out for this reason
static inline float fastpow2 (float p) {
  float offset = (p < 0) ? 1.0f : 0.0f;<commit_msg>use common lowest value<commit_after>#ifndef CNN_GPU_FUNCTORS_H
#define CNN_GPU_FUNCTORS_H

#include <cstdint>
using namespace std;
#if HAVE_CUDA
#define CNN_DEVICE_FUNC __device__
#define CNN_DEVICE_MIN -1.175494351e-38f
#else
#include <boost/math/special_functions/digamma.hpp>
#define CNN_DEVICE_FUNC
#define CNN_DEVICE_MIN -1.175494351e-38f
#endif

// these functions are used both in CPU and in GPU computation
// this file may be compiled with NVCC or a standard C++ tool.
// if you need a new elementwise (nullary, unary, binary...)
// functor, this is the place for it
//
// note: also see xfunctors.h - functors implemented there can
// use Eigen's internal support for vectorized operations which
// can give faster performance on some hardware

#define cast_uint32_t static_cast<uint32_t>

// THIS CODE IS BROKEN- sometimes it returns NaN
// it is commented out for this reason
static inline float fastpow2 (float p) {
  float offset = (p < 0) ? 1.0f : 0.0f;
{'fraction_non_alphanumeric': 0.08523908523908524, 'fraction_numerical': 0.029106029106029108, 'mean_word_length': 4.422535211267606, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 10, 'https://': 0, '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': '7169643', 'n_tokens_mistral': 649, 'n_tokens_neox': 606, 'n_words': 235}