Skip to content

Commit

Permalink
removed some XXXs
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.daimi.au.dk/svn/tpie/trunk@458 669acd26-ddd2-4139-9e68-486997aa639d
  • Loading branch information
Rajiv Wickremesingh committed Jul 6, 1999
1 parent c64fbd1 commit 39d12c3
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions tpie/include/ami_optimized_merge.h
Expand Up @@ -20,7 +20,7 @@
// keys of the items; there is a provision to to use templated heaps // keys of the items; there is a provision to to use templated heaps
// to implement the merge. // to implement the merge.


// $Id: ami_optimized_merge.h,v 1.40 1999-06-27 21:50:13 laura Exp $ // $Id: ami_optimized_merge.h,v 1.41 1999-07-06 02:59:55 rajiv Exp $
// TO DO: substream_count setting; don't depend on current_stream_len // TO DO: substream_count setting; don't depend on current_stream_len




Expand Down Expand Up @@ -1684,7 +1684,7 @@ AMI_partition_and_merge_stream(AMI_STREAM<T> *instream,
LOG_DEBUG_ID("memory error"); LOG_DEBUG_ID("memory error");
return AMI_ERROR_MM_ERROR; return AMI_ERROR_MM_ERROR;
} }
if(XXX_PRINT) XXX;
//Conservatively assume that the memory for buffers for //Conservatively assume that the memory for buffers for
//the two streams is unallocated; so we need to subtract. //the two streams is unallocated; so we need to subtract.


Expand All @@ -1694,15 +1694,15 @@ if(XXX_PRINT) XXX;
LOG_DEBUG_ID("memory error"); LOG_DEBUG_ID("memory error");
return ae; return ae;
} }
if(XXX_PRINT) XXX;
if ((ae = instream->main_memory_usage(&sz_substream, if ((ae = instream->main_memory_usage(&sz_substream,
MM_STREAM_USAGE_OVERHEAD)) != MM_STREAM_USAGE_OVERHEAD)) !=
AMI_ERROR_NO_ERROR) { AMI_ERROR_NO_ERROR) {


LOG_DEBUG_ID("memory error"); LOG_DEBUG_ID("memory error");
return ae; return ae;
} }
if(XXX_PRINT) XXX;
sz_avail -= 2*sz_stream; sz_avail -= 2*sz_stream;




Expand All @@ -1718,25 +1718,25 @@ if(XXX_PRINT) XXX;
len = instream->stream_len(); len = instream->stream_len();
instream->seek(0); instream->seek(0);


if(XXX_PRINT) XXX;
if ((len * sizeof(T)) <= sz_avail) if ((len * sizeof(T)) <= sz_avail)


{ {


T * next_item; T * next_item;
T * mm_stream = new T[len]; T * mm_stream = new T[len];
if(XXX_PRINT) XXX;
for (int i = 0; i < len; i++) for (int i = 0; i < len; i++)
{ {
if ((ae = instream->read_item(&next_item)) != AMI_ERROR_NO_ERROR) if ((ae = instream->read_item(&next_item)) != AMI_ERROR_NO_ERROR)
{ {
if(XXX_PRINT) XXX;
LOG_DEBUG_ID("read error"); LOG_DEBUG_ID("read error");
return ae; return ae;
} }
mm_stream[i] = *next_item; mm_stream[i] = *next_item;
} }
if(XXX_PRINT) XXX;
cout << "qsorting in all in-memory-sort\n"; cout << "qsorting in all in-memory-sort\n";
quicker_sort_cmp((T *)mm_stream,len,cmp); quicker_sort_cmp((T *)mm_stream,len,cmp);
cout << "returned from qsorting\n"; cout << "returned from qsorting\n";
Expand All @@ -1756,7 +1756,7 @@ if(XXX_PRINT) XXX;
return AMI_ERROR_NO_ERROR; return AMI_ERROR_NO_ERROR;


} else { } else {
if(XXX_PRINT) XXX;
// The number of substreams that the original input stream // The number of substreams that the original input stream
// will be split into. // will be split into.


Expand Down Expand Up @@ -1786,7 +1786,7 @@ if(XXX_PRINT) XXX;


// The stream being read at the current level. // The stream being read at the current level.


if(XXX_PRINT) XXX;
//RAKESH //RAKESH
AMI_STREAM<T> **current_input; AMI_STREAM<T> **current_input;


Expand Down Expand Up @@ -1840,7 +1840,7 @@ if(XXX_PRINT) XXX;
//To support a binary merge, need space for max_stream_usage //To support a binary merge, need space for max_stream_usage
//for at least three stream objects. //for at least three stream objects.


if(XXX_PRINT) XXX;
if (sz_avail <= 3*(sz_stream + sz_substream if (sz_avail <= 3*(sz_stream + sz_substream
+ sizeof(merge_heap_element<T>)) + sizeof(merge_heap_element<T>))


Expand All @@ -1851,7 +1851,7 @@ if(XXX_PRINT) XXX;
return AMI_ERROR_INSUFFICIENT_MAIN_MEMORY; return AMI_ERROR_INSUFFICIENT_MAIN_MEMORY;
} }


if(XXX_PRINT) XXX;
sz_original_substream = (sz_avail)/sizeof(T); sz_original_substream = (sz_avail)/sizeof(T);


// Round the original substream length off to an integral // Round the original substream length off to an integral
Expand Down Expand Up @@ -1889,7 +1889,7 @@ if(XXX_PRINT) XXX;
merge_arity = sz_avail_during_merge/sz_stream_during_merge; merge_arity = sz_avail_during_merge/sz_stream_during_merge;


} }
if(XXX_PRINT) XXX;
// Make sure that the AMI is willing to provide us with the // Make sure that the AMI is willing to provide us with the
// number of substreams we want. It may not be able to due to // number of substreams we want. It may not be able to due to
// operating system restrictions, such as on the number of // operating system restrictions, such as on the number of
Expand Down Expand Up @@ -1924,7 +1924,7 @@ if(XXX_PRINT) XXX;


return AMI_ERROR_INSUFFICIENT_MAIN_MEMORY; return AMI_ERROR_INSUFFICIENT_MAIN_MEMORY;
} }
if(XXX_PRINT) XXX;


//#define MINIMIZE_INITIAL_SUBSTREAM_LENGTH //#define MINIMIZE_INITIAL_SUBSTREAM_LENGTH
#ifdef MINIMIZE_INITIAL_SUBSTREAM_LENGTH #ifdef MINIMIZE_INITIAL_SUBSTREAM_LENGTH
Expand Down Expand Up @@ -2000,7 +2000,7 @@ if(XXX_PRINT) XXX;


initial_tmp_stream = new (AMI_STREAM<T> *)[merge_arity]; initial_tmp_stream = new (AMI_STREAM<T> *)[merge_arity];
mm_stream = new T[sz_original_substream]; mm_stream = new T[sz_original_substream];
if(XXX_PRINT) XXX;


tp_assert(mm_stream != NULL, "Misjudged available main memory."); tp_assert(mm_stream != NULL, "Misjudged available main memory.");


Expand Down Expand Up @@ -2031,7 +2031,7 @@ if(XXX_PRINT) XXX;
char new_stream_name[BTE_PATH_NAME_LEN]; char new_stream_name[BTE_PATH_NAME_LEN];


//For the first stream: //For the first stream:
if(XXX_PRINT) XXX;
for (ii_streams = 0; ii_streams < merge_arity; ii_streams ++) for (ii_streams = 0; ii_streams < merge_arity; ii_streams ++)
{ {


Expand Down Expand Up @@ -2059,7 +2059,7 @@ if(XXX_PRINT) XXX;
//directory in which the temporary/intermediate streams will be made. //directory in which the temporary/intermediate streams will be made.
//By default, I think we shd //By default, I think we shd


if(XXX_PRINT) XXX;
stream_name_generator(working_disk, stream_name_generator(working_disk,
prefix_name[0], prefix_name[0],
current_stream, current_stream,
Expand All @@ -2077,7 +2077,7 @@ if(XXX_PRINT) XXX;


initial_tmp_stream[current_stream] = new AMI_STREAM<T>( initial_tmp_stream[current_stream] = new AMI_STREAM<T>(
new_stream_name); new_stream_name);
if(XXX_PRINT) XXX;
initial_tmp_stream[current_stream]->persist(PERSIST_PERSISTENT); initial_tmp_stream[current_stream]->persist(PERSIST_PERSISTENT);




Expand Down Expand Up @@ -2110,7 +2110,7 @@ if(XXX_PRINT) XXX;


// Read a memory load out of the input stream one item at a time, // Read a memory load out of the input stream one item at a time,
// fill up the key array at the same time. // fill up the key array at the same time.
if(XXX_PRINT) XXX;
{ {
T * next_item; T * next_item;
for (int i = 0; i < mm_len; i++) for (int i = 0; i < mm_len; i++)
Expand All @@ -2122,7 +2122,7 @@ if(XXX_PRINT) XXX;
} }
mm_stream[i] = *next_item; mm_stream[i] = *next_item;
} }
if(XXX_PRINT) XXX;
//Sort the array. //Sort the array.


cout << "quicksorting\n"; cout << "quicksorting\n";
Expand Down Expand Up @@ -2163,7 +2163,7 @@ if(XXX_PRINT) XXX;
// We do not want old streams hanging around // We do not want old streams hanging around
// occuping memory. We know how to get the streams // occuping memory. We know how to get the streams
// since we can generate their names // since we can generate their names
if(XXX_PRINT) XXX;


if (initial_tmp_stream[current_stream]) if (initial_tmp_stream[current_stream])
{ {
Expand Down Expand Up @@ -2200,7 +2200,7 @@ if(XXX_PRINT) XXX;
initial_tmp_stream[current_stream] = initial_tmp_stream[current_stream] =
new AMI_STREAM<T>(new_stream_name); new AMI_STREAM<T>(new_stream_name);


if(XXX_PRINT) XXX;




initial_tmp_stream[current_stream]->persist(PERSIST_PERSISTENT); initial_tmp_stream[current_stream]->persist(PERSIST_PERSISTENT);
Expand Down Expand Up @@ -2231,7 +2231,7 @@ if(XXX_PRINT) XXX;
// Make sure the total length of the temporary stream is the // Make sure the total length of the temporary stream is the
// same as the total length of the original input stream. // same as the total length of the original input stream.


if(XXX_PRINT) XXX;
tp_assert(instream->stream_len() == check_size, tp_assert(instream->stream_len() == check_size,
"Stream lengths do not match:" << "Stream lengths do not match:" <<
"\n\tinstream->stream_len() = " << instream->stream_len() << "\n\tinstream->stream_len() = " << instream->stream_len() <<
Expand Down Expand Up @@ -2283,7 +2283,7 @@ if(XXX_PRINT) XXX;
{ {




if(XXX_PRINT) XXX;
// Set up to process a given level. // Set up to process a given level.
//RAKESH //RAKESH
tp_assert(len == check_size, tp_assert(len == check_size,
Expand Down Expand Up @@ -2356,7 +2356,7 @@ if(XXX_PRINT) XXX;
outstream, outstream,
cmp); cmp);


if(XXX_PRINT) XXX;


if (ae != AMI_ERROR_NO_ERROR) { if (ae != AMI_ERROR_NO_ERROR) {
LOG_DEBUG_ID("AMI_single_merge error"); LOG_DEBUG_ID("AMI_single_merge error");
Expand Down Expand Up @@ -2410,7 +2410,7 @@ if(XXX_PRINT) XXX;
// The names of these streams (storing the input runs) // The names of these streams (storing the input runs)
// can be constructed from prefix_name[k % 2] // can be constructed from prefix_name[k % 2]


if(XXX_PRINT) XXX;
for (ii=0; ii < merge_arity; ii++) for (ii=0; ii < merge_arity; ii++)
{ {


Expand Down Expand Up @@ -2475,7 +2475,7 @@ if(XXX_PRINT) XXX;
#endif #endif




if(XXX_PRINT) XXX;


intermediate_tmp_stream[current_stream] = new intermediate_tmp_stream[current_stream] = new
AMI_STREAM<T>(new_stream_name); AMI_STREAM<T>(new_stream_name);
Expand Down Expand Up @@ -2514,7 +2514,7 @@ if(XXX_PRINT) XXX;
runs_in_current_stream = 0; runs_in_current_stream = 0;
unsigned int merge_number = 0; unsigned int merge_number = 0;


if(XXX_PRINT) XXX;




// Loop through the substreams of the current stream, // Loop through the substreams of the current stream,
Expand Down Expand Up @@ -2617,7 +2617,7 @@ if(XXX_PRINT) XXX;


intermediate_tmp_stream[current_stream] = new intermediate_tmp_stream[current_stream] = new
AMI_STREAM<T>(new_stream_name); AMI_STREAM<T>(new_stream_name);
if(XXX_PRINT) XXX;




intermediate_tmp_stream[current_stream]->persist( intermediate_tmp_stream[current_stream]->persist(
Expand Down Expand Up @@ -2706,7 +2706,7 @@ if(XXX_PRINT) XXX;


} }


if(XXX_PRINT) XXX;
//Monitoring prints. //Monitoring prints.


LOG_DEBUG_INFO("Number of passes incl run formation is " << k+1 << "\n"); LOG_DEBUG_INFO("Number of passes incl run formation is " << k+1 << "\n");
Expand Down

0 comments on commit 39d12c3

Please sign in to comment.