<commit_before>/****************************************************************/
/*               DO NOT MODIFY THIS HEADER                      */
/* MOOSE - Multiphysics Object Oriented Simulation Environment  */
/*                                                              */
/*           (c) 2010 Battelle Energy Alliance, LLC             */
/*                   ALL RIGHTS RESERVED                        */
/*                                                              */
/*          Prepared by Battelle Energy Alliance, LLC           */
/*            Under Contract No. DE-AC07-05ID14517              */
/*            With the U. S. Department of Energy               */
/*                                                              */
/*            See COPYRIGHT for full restrictions               */
/****************************************************************/

#ifndef PARALLELUNIQUEID_H
#define PARALLELUNIQUEID_H

#include "libmesh/libmesh_common.h"
#include "libmesh/threads.h"

#ifdef LIBMESH_HAVE_TBB_API
#include "tbb/concurrent_queue.h"
#include "tbb/tbb_thread.h"
#endif

typedef unsigned int THREAD_ID;

class ParallelUniqueId
{
public:

  ParallelUniqueId()
  {
#ifdef LIBMESH_HAVE_TBB_API
    ids.pop(id);
#else
#ifdef LIBMESH_HAVE_PTHREAD
    mutex.lock();
    id = ids.back();
    ids.pop_back();
    mutex.unlock();
#else
    id = 0;
#endif<commit_msg>Need the "using namespace" declaration in ParallelUniqueID - refs #1816<commit_after>/****************************************************************/
/*               DO NOT MODIFY THIS HEADER                      */
/* MOOSE - Multiphysics Object Oriented Simulation Environment  */
/*                                                              */
/*           (c) 2010 Battelle Energy Alliance, LLC             */
/*                   ALL RIGHTS RESERVED                        */
/*                                                              */
/*          Prepared by Battelle Energy Alliance, LLC           */
/*            Under Contract No. DE-AC07-05ID14517              */
/*            With the U. S. Department of Energy               */
/*                                                              */
/*            See COPYRIGHT for full restrictions               */
/****************************************************************/

#ifndef PARALLELUNIQUEID_H
#define PARALLELUNIQUEID_H

#include "Moose.h"  // included for namespace usage

#include "libmesh/libmesh_common.h"
#include "libmesh/threads.h"

#ifdef LIBMESH_HAVE_TBB_API
#include "tbb/concurrent_queue.h"
#include "tbb/tbb_thread.h"
#endif

typedef unsigned int THREAD_ID;

class ParallelUniqueId
{
public:

  ParallelUniqueId()
  {
#ifdef LIBMESH_HAVE_TBB_API
    ids.pop(id);
#else
#ifdef LIBMESH_HAVE_PTHREAD
    mutex.lock();
    id = ids.back();
    ids.pop_back();
    mutex.unlock();
#else
    id = 0;
#endif
{'fraction_non_alphanumeric': 0.17409326424870467, 'fraction_numerical': 0.011053540587219343, 'mean_word_length': 1.5248474280732345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '240645', 'n_tokens_mistral': 776, 'n_tokens_neox': 711, 'n_words': 175}