<commit_before>#pragma once

#include <cuda_runtime_api.h>

#include "pitched_ptr.h"

class CudaAllocator
{
public:
   static CudaAllocator& getRef();

   template<class T>
   void allocate(T* &ptr, std::size_t nElements);
   template<class T>
   void free(T* m);

private:
   static CudaAllocator *m_ref;
};

template<class T>
void CudaAllocator::allocate(T* &ptr, std::size_t nElements)
{
   checkCuda(cudaMalloc(reinterpret_cast<void**>(&ptr), sizeof(T) * nElements));
}

template<class T>
void CudaAllocator::free(T* m)
{
   cudaFree(m);
}
<commit_msg>Removed an unnecessary and added a necessary include in cuda_allocator.h<commit_after>#pragma once

#include <cuda_runtime_api.h>
#include <cstddef>

class CudaAllocator
{
public:
   static CudaAllocator& getRef();

   template<class T>
   void allocate(T* &ptr, std::size_t nElements);
   template<class T>
   void free(T* m);

private:
   static CudaAllocator *m_ref;
};

template<class T>
void CudaAllocator::allocate(T* &ptr, std::size_t nElements)
{
   checkCuda(cudaMalloc(reinterpret_cast<void**>(&ptr), sizeof(T) * nElements));
}

template<class T>
void CudaAllocator::free(T* m)
{
   cudaFree(m);
}

{'fraction_non_alphanumeric': 0.13745704467353953, 'fraction_numerical': 0.0, 'mean_word_length': 5.581920903954802, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '5407548', 'n_tokens_mistral': 447, 'n_tokens_neox': 442, 'n_words': 97}