<commit_before>
#include <LibUtilities/Memory/ThreadSpecificPool.hpp>
#include <LibUtilities/Memory/NekMemoryManager.hpp>

#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>

#include <boost/shared_ptr.hpp>

#include <boost/mpl/size_t.hpp>



#include <iostream>

using namespace std;
using namespace Nektar;

class Disabled
{
    public:
        Disabled()
        {
            cout << "Creating a disabled." << endl;
        }

        ~Disabled()
        {
            cout << "Destroying a disabled." << endl;
        }
};

class Enabled
{
    public:
        Enabled()
        {
            cout << "Creating a Enabled." << endl;
        }

        ~Enabled()
        {
            cout << "Destroying a Enabled." << endl;
        }
};



int main()
{
    // Object allocation.
    Disabled* t1 = MemoryManager::Allocate<Disabled>();
    MemoryManager::Deallocate(t1);
    assert(t1 == NULL);

    const Disabled* t2 = MemoryManager::Allocate<Disabled>();
    MemoryManager::Deallocate(t2);
    assert(t2 == NULL);

    Enabled* t3 = MemoryManager::Allocate<Enabled>();
    MemoryManager::Deallocate(t3);
    assert(t3 == NULL);

    boost::shared_ptr<Disabled> t4 = MemoryManager::AllocateSharedPtr<Disabled>();
    boost::shared_ptr<Enabled> t5 = MemoryManager::AllocateSharedPtr<Enabled>();

    // This doesn't compile, it really doesn't make sense to allow it to.
    //double* d = MemoryManager::Allocate<double>();

    cout << "\nDouble Array." << endl;
    double* d = MemoryManager::AllocateArray<10, double>();
    MemoryManager::DeallocateArray<10>(d);

    cout << "\nDisabled Array" << endl;
    Disabled* a1 = MemoryManager::AllocateArray<2, Disabled>();
    MemoryManager::DeallocateArray<2>(a1);

    cout << "\nEnabled Array." << endl;
    Enabled* a2 = MemoryManager::AllocateArray<3, Enabled>();
    MemoryManager::DeallocateArray<3>(a2);

    boost::shared_array<Disabled> a3 = MemoryManager::AllocateSharedArray<3, Disabled>();
    boost::shared_array<Enabled> a4 = MemoryManager::AllocateSharedArray<4, Enabled>();
    boost::shared_array<double> a5 = MemoryManager::AllocateSharedArray<5, double>();

    boost::shared_array<double> a6 = MemoryManager::AllocateSharedArray<double>(12);

    cout << "\nDestroy all shared pointers." << endl;


//     boost::shared_array<Class2> a = MemoryManager::AllocateArray<Class2>();
//     boost::shared_array<double> d = MemoryManager::AllocateArray<double>();
    // Allocate a raw
//     boost::thread_group g;
//     for(unsigned int i = 0; i < 2; ++i)
//     {
//         //g.create_thread(testThread);
//         g.create_thread(testNakedThread);
//     }
//
//     g.join_all();



    return 0;
}

<commit_msg>Commented everything out since none of it is valid anymore.<commit_after>
#include <LibUtilities/Memory/ThreadSpecificPool.hpp>
#include <LibUtilities/Memory/NekMemoryManager.hpp>

#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>

#include <boost/shared_ptr.hpp>

#include <boost/mpl/size_t.hpp>



#include <iostream>

using namespace std;
using namespace Nektar;

class Disabled
{
    public:
        Disabled()
        {
            cout << "Creating a disabled." << endl;
        }

        ~Disabled()
        {
            cout << "Destroying a disabled." << endl;
        }
};

class Enabled
{
    public:
        Enabled()
        {
            cout << "Creating a Enabled." << endl;
        }

        ~Enabled()
        {
            cout << "Destroying a Enabled." << endl;
        }
};



int main()
{
//     // Object allocation.
//     Disabled* t1 = MemoryManager::Allocate<Disabled>();
//     MemoryManager::Deallocate(t1);
//     assert(t1 == NULL);
// 
//     const Disabled* t2 = MemoryManager::Allocate<Disabled>();
//     MemoryManager::Deallocate(t2);
//     assert(t2 == NULL);
// 
//     Enabled* t3 = MemoryManager::Allocate<Enabled>();
//     MemoryManager::Deallocate(t3);
//     assert(t3 == NULL);
// 
//     boost::shared_ptr<Disabled> t4 = MemoryManager::AllocateSharedPtr<Disabled>();
//     boost::shared_ptr<Enabled> t5 = MemoryManager::AllocateSharedPtr<Enabled>();
// 
//     // This doesn't compile, it really doesn't make sense to allow it to.
//     //double* d = MemoryManager::Allocate<double>();
// 
//     cout << "\nDouble Array." << endl;
//     double* d = MemoryManager::AllocateArray<10, double>();
//     MemoryManager::DeallocateArray<10>(d);
// 
//     cout << "\nDisabled Array" << endl;
//     Disabled* a1 = MemoryManager::AllocateArray<2, Disabled>();
//     MemoryManager::DeallocateArray<2>(a1);
// 
//     cout << "\nEnabled Array." << endl;
//     Enabled* a2 = MemoryManager::AllocateArray<3, Enabled>();
//     MemoryManager::DeallocateArray<3>(a2);
// 
//     boost::shared_array<Disabled> a3 = MemoryManager::AllocateSharedArray<3, Disabled>();
//     boost::shared_array<Enabled> a4 = MemoryManager::AllocateSharedArray<4, Enabled>();
//     boost::shared_array<double> a5 = MemoryManager::AllocateSharedArray<5, double>();
// 
//     boost::shared_array<double> a6 = MemoryManager::AllocateSharedArray<double>(12);
// 
//     cout << "\nDestroy all shared pointers." << endl;


//     boost::shared_array<Class2> a = MemoryManager::AllocateArray<Class2>();
//     boost::shared_array<double> d = MemoryManager::AllocateArray<double>();
    // Allocate a raw
//     boost::thread_group g;
//     for(unsigned int i = 0; i < 2; ++i)
//     {
//         //g.create_thread(testThread);
//         g.create_thread(testNakedThread);
//     }
//
//     g.join_all();



    return 0;
}


{'fraction_non_alphanumeric': 0.16355475763016158, 'fraction_numerical': 0.013285457809694794, 'mean_word_length': 2.965124555160142, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 69, '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': '6071885', 'n_tokens_mistral': 1789, 'n_tokens_neox': 1711, 'n_words': 341}