comparison audioDB.cpp @ 296:f922c234462f

fixed file size allocation for FORMAT2 files. Made LSH index size() in bytes an unsigned long long. Changed the name of lsh_inCore flag to lsh_on_disk (to reverse the sense of the 'flag').
author mas01mc
date Fri, 01 Aug 2008 15:04:31 +0000
parents d9a88cfd4ab6
children 7907b50d0995
comparison
equal deleted inserted replaced
295:9347d74a2578 296:f922c234462f
373 error("INDEXing requires 1 <= sequenceLength <= 1000"); 373 error("INDEXing requires 1 <= sequenceLength <= 1000");
374 command=COM_INDEX; 374 command=COM_INDEX;
375 dbName=args_info.database_arg; 375 dbName=args_info.database_arg;
376 376
377 // Whether to store LSH hash tables for query in core (FORMAT2) 377 // Whether to store LSH hash tables for query in core (FORMAT2)
378 lsh_in_core = args_info.lsh_inCore_flag; 378 lsh_in_core = args_info.lsh_on_disk_flag; // This flag is set to 0 if on_disk requested
379 379
380 lsh_param_w = args_info.lsh_w_arg; 380 lsh_param_w = args_info.lsh_w_arg;
381 if(!(lsh_param_w>0 && lsh_param_w<=O2_SERIAL_MAX_BINWIDTH)) 381 if(!(lsh_param_w>0 && lsh_param_w<=O2_SERIAL_MAX_BINWIDTH))
382 error("Indexing parameter w out of range (0.0 < w <= 100.0)"); 382 error("Indexing parameter w out of range (0.0 < w <= 100.0)");
383 383
395 395
396 lsh_param_b = args_info.lsh_b_arg; 396 lsh_param_b = args_info.lsh_b_arg;
397 if(!(lsh_param_b>0 && lsh_param_b<=O2_SERIAL_MAX_TRACKBATCH)) 397 if(!(lsh_param_b>0 && lsh_param_b<=O2_SERIAL_MAX_TRACKBATCH))
398 error("Indexing parameter b out of range (1 <= b <= 10000)"); 398 error("Indexing parameter b out of range (1 <= b <= 10000)");
399 399
400 lsh_param_ncols = args_info.lsh_ncols_arg; 400 lsh_param_ncols = args_info.lsh_ncols_arg;
401 if(lsh_in_core) // We don't want to block rows with FORMAT2 indexing
402 lsh_param_ncols = O2_SERIAL_MAX_COLS;
401 if( !(lsh_param_ncols>0 && lsh_param_ncols<=O2_SERIAL_MAX_COLS)) 403 if( !(lsh_param_ncols>0 && lsh_param_ncols<=O2_SERIAL_MAX_COLS))
402 error("Indexing parameter ncols out of range (1 <= ncols <= 1000"); 404 error("Indexing parameter ncols out of range (1 <= ncols <= 1000");
403 405
404 return 0; 406 return 0;
405 } 407 }
462 usingQueryPoint=1; 464 usingQueryPoint=1;
463 if(queryPoint<0 || queryPoint >10000) 465 if(queryPoint<0 || queryPoint >10000)
464 error("queryPoint out of range: 0 <= queryPoint <= 10000"); 466 error("queryPoint out of range: 0 <= queryPoint <= 10000");
465 } 467 }
466 468
467 // Whether to pre-load LSH hash tables for query 469 // Whether to pre-load LSH hash tables for query (default on, if flag set then off)
468 lsh_in_core = args_info.lsh_inCore_flag; 470 lsh_in_core = args_info.lsh_on_disk_flag;
469 471
470 // Whether to perform exact evaluation of points returned by LSH 472 // Whether to perform exact evaluation of points returned by LSH
471 lsh_exact = args_info.lsh_exact_flag; 473 lsh_exact = args_info.lsh_exact_flag;
472 474
473 pointNN = args_info.pointnn_arg; 475 pointNN = args_info.pointnn_arg;