Commit Graph

7 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
07d270c87e Require -std=c++11 and use std::shared_ptr instead of SharedHandle 2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa
4db349c1f3 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80
	columns.
	* src
	* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa
4da631bef6 2009-05-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Moved piece statistics stuff to new PieceStatMan class.
	Refactored PieceSelector interface.
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/LongestSequencePieceSelector.cc
	* src/LongestSequencePieceSelector.h
	* src/Makefile.am
	* src/PieceSelector.h
	* src/PieceStatMan.cc
	* src/PieceStatMan.h
	* src/RarestPieceSelector.cc
	* src/RarestPieceSelector.h
	* src/RequestGroup.cc
	* test/DefaultPieceStorageTest.cc
	* test/InOrderPieceSelector.h
	* test/Makefile.am
	* test/PieceStatManTest.cc
	* test/RarestPieceSelectorTest.cc
2009-05-06 07:49:22 +00:00
Tatsuhiro Tsujikawa
a6b02840fa 2009-03-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
BitfieldMan::getMissingIndexes family functions now takes
	unsigned char* bitfield instead of stl container for efficiency.
	PieceSelector::select now takes this
	bitfield. RarestPieceSelector::select now also performs
	efficiently for this change.  bitfield namespace is introduced
	and it has several helper functions to handle basic bitfield
	operations such as test, count set bits, etc.
	* src/BitfieldMan.cc
	* src/BitfieldMan.h
	* src/DefaultBtRequestFactory.cc
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/LongestSequencePieceSelector.cc
	* src/LongestSequencePieceSelector.h
	* src/Makefile.am
	* src/Piece.cc
	* src/Piece.h
	* src/PieceSelector.h
	* src/RarestPieceSelector.cc
	* src/RarestPieceSelector.h
	* src/Util.cc
	* src/Util.h
	* src/bitfield.h
	* test/BitfieldManTest.cc
	* test/LongestSequencePieceSelectorTest.cc
	* test/Makefile.am
	* test/RarestPieceSelectorTest.cc
	* test/UtilTest.cc
	* test/bitfieldTest.cc
2009-03-28 13:29:38 +00:00
Tatsuhiro Tsujikawa
289ae1b635 2009-03-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced std::vector<SharedHandle<PieceStats> _sortedPieceStats
	with std::vector<size_t> _sortedPieceStatIndexes to reduce the
	cost of std::rotate().
	* src/RarestPieceSelector.cc
	* src/RarestPieceSelector.h
	* test/RarestPieceSelectorTest.cc
2009-03-24 15:24:30 +00:00
Tatsuhiro Tsujikawa
662a90ce9b 2009-03-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Refactored RarestPieceSelector to reduce CPU load, especially
	for addPieceStats.	
	* src/RarestPieceSelector.cc
	* src/RarestPieceSelector.h
2009-03-20 13:37:53 +00:00
Tatsuhiro Tsujikawa
ef02915d82 2008-05-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Put piece selection strategy algorithm to RarestPieceSelector 
class,
	Added a switch to choose whether randomized selection so that 
unit
	tests emit same results in, possibly, win32.
	* src/DefaultPieceStorage.cc
	* src/DefaultPieceStorage.h
	* src/RarestPieceSelector.cc
	* src/RarestPieceSelector.h
	* test/DefaultPieceStorageTest.cc
	* test/RarestPieceSelectorTest.cc
2008-05-17 12:51:54 +00:00