Changeset 2286 for trunk


Ignore:
Timestamp:
Aug 9, 2012, 12:07:26 PM (6 years ago)
Author:
ksherdy
Message:

Removed problematic 'using namespace std;'

Location:
trunk/lib
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/allocator.hpp

    r2275 r2286  
    1414
    1515#include <iostream>
    16 using namespace std;
    1716
    1817///////////////////////////////////////////////////////////////////////////////
     
    6059                        node * next = (node *) malloc(sizeof(node));
    6160                        if (next == NULL) {
    62                                 cerr << "Out of Memory" << endl;
     61                std::cerr << "Out of Memory" << std::endl;
    6362                                abort();
    6463                        }
     
    6665                        next->segment = (uint8_t *) malloc(segment_size);
    6766                        if ((next->segment) == NULL) {
    68                                 cerr << "Out of Memory" << endl;
     67                std::cerr << "Out of Memory" << std::endl;
    6968                                abort();
    7069                        }
     
    10099                        node * next = (node *) malloc(sizeof(node));
    101100                        if (next == NULL) {
    102                                 cerr << "Out of Memory" << endl;
     101                std::cerr << "Out of Memory" << std::endl;
    103102                                abort();
    104103                        }
     
    106105                        next->segment = (uint8_t *) malloc(segment_size);
    107106                        if ((next->segment) == NULL) {
    108                                 cerr << "Out of Memory" << endl;
     107                std::cerr << "Out of Memory" << std::endl;
    109108                                abort();
    110109                        }
  • trunk/lib/bitblock_iterator.hpp

    r2275 r2286  
    1010#include <iterator>
    1111#include <iostream>
    12 using namespace std;
    1312
    1413#include "bitblock.hpp"
     
    1615
    1716template<class bitblock_t, class scanblock_t>
    18 class ForwardIterator : public iterator<input_iterator_tag, int>
     17class ForwardIterator : public std::iterator<std::input_iterator_tag, int>
    1918{
    2019public:
     
    7675
    7776template<class bitblock_t, class scanblock_t>
    78 class ReverseIterator : public iterator<input_iterator_tag, int>
     77class ReverseIterator : public std::iterator<std::input_iterator_tag, int>
    7978{
    8079public:
  • trunk/lib/bitblock_scan.hpp

    r2275 r2286  
    1010#include <iterator>
    1111#include <iostream>
    12 using namespace std;
    13 
    1412#include "bitblock.hpp"
    1513
  • trunk/lib/bitstream_iterator.hpp

    r2275 r2286  
    1010#include <iterator>
    1111#include <iostream>
    12 using namespace std;
    1312
    1413#include "bitblock.hpp" // ctzl, SIMD_type
    1514
    16 class BitStreamIterator: public iterator<input_iterator_tag, int>
     15class BitStreamIterator: public std::iterator<std::input_iterator_tag, int>
    1716{
    1817public:
     
    8786
    8887        void debug() {
    89                 cout << "pos: " << pos << endl;
    90                 cout << "blk: " << blk << endl;
    91                 cout << "blk_pos: " << blk_pos << endl;
     88        std::cout << "pos: " << pos << std::std::endl;
     89        std::cout << "blk: " << blk << std::endl;
     90        std::cout << "blk_pos: " << blk_pos << std::endl;
    9291        }
    9392
  • trunk/lib/byte_compare.hpp

    r2275 r2286  
    3434#include <stdint.h>
    3535#include <iostream>
    36 using namespace std;
    3736
    3837template<class T, uint32_t L> IDISA_ALWAYS_INLINE bool overlap_compare(const uint8_t * x, const uint8_t * y);
  • trunk/lib/carryQ.hpp

    r2275 r2286  
    1010#include <stdint.h>
    1111#include <iostream>
    12 using namespace std;
    1312
    1413#include "bitblock.hpp"
  • trunk/lib/debug.hpp

    r2275 r2286  
    99
    1010#include <iostream>
    11 using namespace std;
    1211
    1312// #define NDEBUG // if NDEBUG then disable assertions
     
    1716#define VAR(name, value)
    1817#else
    19 #define MSG(str) cout << str << endl;
    20 #define VAR(name, value) cout << name << ":" << value << endl;
     18#define MSG(str) std::cout << str << std::endl;
     19#define VAR(name, value) std::cout << name << ":" << value << std::endl;
    2120#endif
    2221
  • trunk/lib/hash.hpp

    r2275 r2286  
    1616#include <stdint.h>
    1717#include <iostream>
    18 using namespace std;
    1918
    2019///////////////////////////////////////////////////////////////////////////////
     
    6160//#ifdef HASH_HPP_DEBUG
    6261//    print_register<BitBlock>("base", *(BitBlock *)base);
    63 //    cout << "byte index:" << byte_idx << endl;
     62//    std::cout << "byte index:" << byte_idx << std::endl;
    6463//    print_register<BitBlock>("shift", *(BitBlock *)&shift);
    6564//    print_register<uint64_t>("mask", mask);
     
    8079#ifdef HASH_HPP_DEBUG
    8180    print_register<uint64_t>("base", *(uint64_t *)base);
    82     cout << "           bit index = " << bit_idx << endl;
     81    std::cout << "           bit index = " << bit_idx << std::endl;
    8382    print_register<uint64_t>("shift", *(uint64_t *)&shift);
    8483    print_register<uint64_t>("mask", mask);
     
    136135
    137136#ifndef NDEBUG
    138     cout << "Stream offset (bit):  " << offset << endl;
    139     cout << "Symbol lgth (bits): " << slice_size << endl;
    140     cout << "Hash size (bits):   " << hash_size << endl;
    141     cout << "Shift (bits): " << shift << endl;
     137    std::cout << "Stream offset (bit):  " << offset << std::endl;
     138    std::cout << "Symbol lgth (bits): " << slice_size << std::endl;
     139    std::cout << "Hash size (bits):   " << hash_size << std::endl;
     140    std::cout << "Shift (bits): " << shift << std::endl;
    142141
    143142    print_register<uint64_t>("base", *(uint64_t *)base);
  • trunk/lib/perflib/BOM_Profiler.h

    r2275 r2286  
    3636#ifndef BOM_Profiler_H
    3737#define BOM_Profiler_H
    38 
    39 //#include <iostream>
    40 
    41 //using namespace std;
    4238
    4339#include "i386_timer.h"
Note: See TracChangeset for help on using the changeset viewer.