├── .gitignore ├── CMakeLists.bak.10232020.txt ├── CMakeLists.txt ├── LICENSE ├── README.md ├── app ├── NSG_candidate_distance_step.cpp ├── NSG_neighbor_distance_step.cpp ├── NSG_omp_profile_multi_queues.cpp ├── NSG_omp_profile_multi_queues_LG.cpp ├── NSG_seq_LG_K_values.cpp ├── NSG_seq_LG_percentile.cpp ├── PSS_LG_all_monotonic_bfs_subgraph.cpp ├── PSS_LG_bfs_nn_subgraph.cpp ├── PSS_LG_bfs_path_from_17_vertices_w_radius_bound.cpp ├── PSS_LG_connected_to_nn_all_monotonic_bfs_subgraph.cpp ├── PSS_LG_in_6_steps_connected_to_nn_all_monotonic_bfs_subgraph.cpp ├── PSS_LG_mini_cut_bfs_subgraph.cpp ├── PSS_LG_monotonic_bfs_subgraph.cpp ├── PSS_LG_parallel_search_path_2_steps_dist_prune.cpp ├── PSS_LG_parallel_search_path_in_subgraph.cpp ├── PSS_LG_parallel_search_path_in_subgraph_core_only.cpp ├── PSS_LG_parallel_search_path_in_subgraph_w_nonmono.cpp ├── PSS_v5_LG_K_values.cpp ├── PSS_v5_LG_core_subgraph.cpp ├── PSS_v5_LG_count_reorder.cpp ├── PSS_v5_LG_degree_reorder.cpp ├── PSS_v5_LG_degree_reorder_no_search.cpp ├── PSS_v5_LG_distance_step.cpp ├── PSS_v5_LG_distance_threshold_profiling.cpp ├── PSS_v5_LG_distance_threshold_profiling_no_search.cpp ├── PSS_v5_LG_in_degree.cpp ├── PSS_v5_LG_nn_distribution.cpp ├── PSS_v5_LG_nn_distribution_2_steps_dist_prune.cpp ├── PSS_v5_LG_percentile.cpp ├── PSS_v5_LG_separate_search.cpp ├── PSS_v5_LG_v_counter.cpp ├── PSS_v5_distance_threshold_profiling.cpp ├── PSS_v5_distance_threshold_profiling_no_search.cpp ├── PSS_v5_every_step_merge.bak.cpp ├── PSS_v5_find_L_every_step_merge.cpp ├── PSS_v5_find_L_every_step_merge_LG.cpp ├── PSS_v5_find_L_every_step_merge_LG_for_ratio_1st_half.cpp ├── PSS_v5_find_L_every_step_merge_L_master_LG.cpp ├── PSS_v5_find_L_every_step_merge_fixed_local_L_LG.cpp ├── PSS_v5_find_L_fixed_local_L_update_positions_LG.cpp ├── PSS_v5_find_L_index_adaptive_merge_LG.cpp ├── PSS_v5_find_L_index_adaptive_merge_L_master_LG.cpp ├── PSS_v5_find_L_no_staged_LG.cpp ├── PSS_v5_find_L_path_wise_every_step_merge_LG.cpp ├── PSS_v5_multi_queries.cpp ├── PSS_v5_multi_queries_LG.cpp ├── PSS_v5_multi_queries_load_balance.cpp ├── PSS_v5_multi_queries_load_balance_LG.cpp ├── PSS_v5_multi_queries_tuning_intra_LG.cpp ├── PSS_v5_sequence_traverse.cpp ├── PSS_v5_sequence_traverse_B.cpp ├── PSS_v5_worker_std_deviation_LG.cpp ├── PSS_v5_worker_variation_LG.cpp ├── PSS_v6_LG_radius_bound.cpp ├── PSS_v6_radius_bound.cpp ├── app_para_searching.cpp ├── app_para_searching_LG.cpp ├── atest.cpp ├── deprecated │ ├── app_batch_searching.cpp │ ├── app_batch_top_m_seq_search.cpp │ ├── app_para_searching.cpp │ ├── app_seq_searching.cpp │ ├── app_top_m_batch_search.cpp │ ├── app_top_m_para_search.cpp │ ├── app_top_m_seq_search.cpp │ ├── profile_find_L_para_single_query_search_PSS_v5_global_queue_profile.cpp │ ├── profile_find_L_para_single_query_search_simple_v3_decrease_X.cpp │ ├── profile_find_L_para_single_query_search_simple_v3_double_X.cpp │ ├── profile_find_L_para_single_query_search_simple_v3_half_X.cpp │ ├── profile_find_L_para_single_query_search_simple_v3_increase_X.cpp │ ├── profile_find_L_para_single_query_search_simple_v3_large_graph_decrease_X.cpp │ ├── profile_find_L_para_single_query_search_simple_v3_large_graph_increase_X.cpp │ ├── profile_find_L_seq_single_query_simple_search.sv3_version.bak.cpp │ ├── profile_find_L_seq_single_query_simple_search_large_graph.sv3_version.bak.cpp │ ├── profile_nested_para_top_m_search.cpp │ ├── profile_no_omp_top_m_seq_search.cpp │ ├── profile_nsg_optimized_search.cpp │ ├── profile_para_multi_queries_top_m_search_vtune.cpp │ ├── profile_para_simple_search_subsearch.cpp │ ├── profile_para_simple_search_two_global_queues.atomic.cpp │ ├── profile_para_simple_search_two_global_queues.bak.cpp │ ├── profile_para_single_query_search_simple_v3_large_graph_debug_for_deep100M.cpp │ ├── profile_para_single_query_search_simple_v3_large_graph_num_checked_x.cpp │ ├── profile_para_single_query_search_simple_v3_large_graph_ranged_num_checked.cpp │ ├── profile_para_single_query_search_simple_v3_large_graph_ranged_v2.cpp │ ├── profile_para_single_query_search_simple_v3_large_graph_ranged_with_metric_mean.cpp │ ├── profile_para_single_query_search_simple_v3_large_graph_worst_and_best_unchecked.cpp │ ├── profile_para_single_query_search_simple_v3_profile_cache_miss.cpp │ ├── profile_para_single_query_search_simple_v3_profile_runtime.cpp │ ├── profile_para_single_query_search_simple_v3_ranged.bak.cpp │ ├── profile_para_single_query_search_simple_v3_ranged.bak.strange.cpp │ ├── profile_para_single_query_search_simple_v3_ranged_heuristic_X.cpp │ ├── profile_para_single_query_search_simple_v3_ranged_num_checked.bak.cpp │ ├── profile_para_single_query_search_simple_v3_ranged_num_checked.cpp │ ├── profile_para_single_query_search_simple_v3_standard_deviation.cpp │ ├── profile_para_single_query_search_simple_v3_standard_deviation_samples.cpp │ ├── profile_para_single_query_search_simple_v3_stddev_metric.cpp │ ├── profile_para_single_query_search_simple_v3_stddev_metric_samples.cpp │ ├── profile_para_single_query_top_m_search.202002250815.buckets_equal_width.cpp │ ├── profile_para_single_query_top_m_search.cpp │ ├── profile_para_single_query_top_m_search_better_merge.cpp │ ├── profile_para_single_query_top_m_search_by_sort.cpp │ ├── profile_para_single_query_top_m_search_collector_threads.cpp │ ├── profile_para_single_query_top_m_search_hierarchy_merge.cpp │ ├── profile_para_single_query_top_m_search_interval_merge.cpp │ ├── profile_para_single_query_top_m_search_interval_merge.v2.cpp │ ├── profile_para_single_query_top_m_search_interval_merge.v3.cpp │ ├── profile_para_single_query_top_m_search_interval_merge.v4.cpp │ ├── profile_para_single_query_top_m_search_interval_merge.v5.cpp │ ├── profile_para_single_query_top_m_search_less_sync.cpp │ ├── profile_para_single_query_top_m_search_little_m.cpp │ ├── profile_para_single_query_top_m_search_m_width.cpp │ ├── profile_para_single_query_top_m_search_middle_m.profile.cpp │ ├── profile_para_single_query_top_m_search_more_hierarchy.cpp │ ├── profile_para_single_query_top_m_search_no_merge.cpp │ ├── profile_para_single_query_top_m_search_pure.cpp │ ├── profile_para_single_query_top_m_search_relative_distance_threshold.cpp │ ├── profile_para_single_query_top_m_search_relative_distance_threshold_middle-iteration.cpp │ ├── profile_para_single_query_top_m_search_selecting.cpp │ ├── profile_para_single_query_top_m_search_selecting_out.cpp │ ├── profile_para_single_query_top_m_search_selecting_out.gather_top_m.seq_par.mth.cpp │ ├── profile_para_single_query_top_m_search_selecting_out.mth.cpp │ ├── profile_para_single_query_top_m_search_selecting_out.only_gather_top_m.cpp │ ├── profile_para_single_query_top_m_search_selecting_out.only_gather_top_m.profile.cpp │ ├── profile_para_single_query_top_m_search_selecting_out.profile.gather_top_m.seq_par.mth.cpp │ ├── profile_para_single_query_top_m_search_selecting_out.profile.seq_par.mth.cpp │ ├── profile_para_single_query_top_m_search_selecting_out.seq_par.mth.cpp │ ├── profile_para_single_query_top_m_search_sequential_merge.cpp │ ├── profile_para_single_query_top_m_search_simple_top_m.cpp │ ├── profile_para_single_query_top_m_search_simple_top_m.v2.cpp │ ├── profile_para_single_query_top_m_search_subsearch.cpp │ ├── profile_para_single_query_top_m_search_sync_or_not.cpp │ ├── profile_seq_searching_BitVector.cpp │ ├── profile_seq_searching_find_value_L.cpp │ ├── profile_seq_searching_with_set_queue.cpp │ ├── profile_seq_single_query_simple_search.cpp │ ├── profile_seq_single_query_top_m_search_middle_m.cpp │ ├── profile_seq_single_query_top_m_search_scale_m.cpp │ ├── profile_seq_single_query_top_m_search_top_m.cpp │ ├── profile_top_m_batch_search_batch_size.cpp │ ├── profile_top_m_batch_search_find_L.cpp │ ├── profile_top_m_batch_search_value_m.cpp │ ├── profile_top_m_para_search.cpp │ ├── profile_top_m_search.cpp │ ├── profile_top_m_search_for_measure.cpp │ ├── profile_top_m_seq_search_bit_CAS.cpp │ ├── profile_top_m_seq_search_myths_M.cpp │ ├── profile_top_m_seq_search_scale_m.cpp │ ├── profile_visited_array_top_m_seq_search.cpp │ ├── profile_yes_omp_top_m_seq_search.cpp │ ├── test_nsg_optimized_search.cpp │ ├── test_nsg_optimized_search_para.cpp │ ├── test_omp_no.cpp │ └── test_omp_yes.cpp ├── hnsw_index.cpp ├── hnsw_search.cpp ├── pcm_demo.cpp ├── pcm_mem_NSG_find_L_LG.cpp ├── pcm_mem_NSG_inter_query_LG.cpp ├── pcm_mem_NSG_omp_find_LG.cpp ├── pcm_mem_NoStaged_LG.cpp ├── pcm_mem_NoSync_merge_once_LG.cpp ├── pcm_mem_PSS_v5_LG.cpp ├── pcm_mem_PSS_v5_find_L_index_adaptive_merge_L_master_LG.cpp ├── pcm_mem_PathWise_every_step_merge_LG.cpp ├── profile_batch_top_m_search_embarrassing_para.cpp ├── profile_find_L_para_single_query_NSG_omp.cpp ├── profile_find_L_para_single_query_NSG_omp_large_graph.cpp ├── profile_find_L_para_single_query_NSG_omp_large_graph_profile.cpp ├── profile_find_L_para_single_query_NSG_omp_profile.cpp ├── profile_find_L_para_single_query_scale_m_search_pure.cpp ├── profile_find_L_para_single_query_scale_m_search_pure_large_graph.cpp ├── profile_find_L_para_single_query_scale_m_search_pure_large_graph_last_update_step.cpp ├── profile_find_L_para_single_query_scale_m_search_pure_large_graph_num_unchecked.cpp ├── profile_find_L_para_single_query_scale_m_search_pure_large_graph_profiling.cpp ├── profile_find_L_para_single_query_scale_m_search_pure_profiling.cpp ├── profile_find_L_para_single_query_search_PSS_v4_large_graph_profile.cpp ├── profile_find_L_para_single_query_search_PSS_v4_profile.cpp ├── profile_find_L_para_single_query_search_PSS_v5_large_graph_profile.cpp ├── profile_find_L_para_single_query_search_PSS_v5_profile.backup_202101311359.bug.cpp ├── profile_find_L_para_single_query_search_PSS_v5_profile.backup_202101311432.bug.cpp ├── profile_find_L_para_single_query_search_PSS_v5_profile.backup_202101311831.master_queue.cpp ├── profile_find_L_para_single_query_search_PSS_v5_profile.cpp ├── profile_find_L_para_single_query_search_simple_v3.cpp ├── profile_find_L_para_single_query_search_simple_v3_large_graph.cpp ├── profile_find_L_para_single_query_search_simple_v3_large_graph_one_merge.cpp ├── profile_find_L_para_single_query_search_simple_v3_one_merge.cpp ├── profile_find_L_para_single_query_top_m_search_Ligra.cpp ├── profile_find_L_para_single_query_top_m_search_pure.cpp ├── profile_find_L_para_single_query_top_m_search_pure_large_graph.cpp ├── profile_find_L_para_single_query_top_m_search_pure_large_graph_backtracking.cpp ├── profile_find_L_para_single_query_top_m_search_pure_large_graph_last_update_step.cpp ├── profile_find_L_para_single_query_top_m_search_pure_large_graph_num_unchecked.cpp ├── profile_find_L_para_single_query_top_m_search_pure_large_graph_profiling.cpp ├── profile_find_L_para_single_query_top_m_search_pure_large_graph_rank_0.cpp ├── profile_find_L_para_single_query_top_m_search_pure_profiling.cpp ├── profile_find_L_seq_single_query_simple_search.cpp ├── profile_find_L_seq_single_query_simple_search_large_graph.cpp ├── profile_find_L_seq_single_query_simple_search_large_graph_backtracking.cpp ├── profile_find_L_seq_single_query_simple_search_large_graph_last_update_step.cpp ├── profile_find_L_seq_single_query_simple_search_large_graph_num_unchecked.cpp ├── profile_find_L_seq_single_query_simple_search_large_graph_rank_0.cpp ├── profile_find_X_para_single_query_search_simple_v3.cpp ├── profile_para_simple_search_two_global_queues.cpp ├── profile_para_simple_search_two_global_queues.workbuffer.cpp ├── profile_para_single_query_async_search_error_count.cpp ├── profile_para_single_query_search_PSS_v4_large_graph_ranged.cpp ├── profile_para_single_query_search_PSS_v4_large_graph_ranged_profiling.cpp ├── profile_para_single_query_search_PSS_v4_ranged.cpp ├── profile_para_single_query_search_PSS_v4_ranged_profiling.cpp ├── profile_para_single_query_search_PSS_v5_dist_thresh_ranged_profiling.bak.cpp ├── profile_para_single_query_search_PSS_v5_dist_thresh_ranged_profiling.cpp ├── profile_para_single_query_search_PSS_v5_large_graph_dist_thresh_ranged_profiling.cpp ├── profile_para_single_query_search_PSS_v5_ranged_profiling.cpp ├── profile_para_single_query_search_PSS_v6_ranged_profiling.cpp ├── profile_para_single_query_search_simple_v3.cpp ├── profile_para_single_query_search_simple_v3_large_graph.cpp ├── profile_para_single_query_search_simple_v3_large_graph_ranged.cpp ├── profile_para_single_query_search_simple_v3_ranged.cpp ├── profile_para_single_query_top_m_search_m_width.v2.cpp ├── profile_para_single_query_top_m_search_middle_m.cpp ├── profile_seq_simple_search_two_queues.cpp ├── test.app.cpp └── test_neighbors_distance_to_father.cpp ├── core ├── Searching.202004131634.better_merge.h ├── Searching.202004131637.better_merge.LG.h ├── Searching.202005271122.choosing_m.h ├── Searching.202007121434.two_queues.bak.h ├── Searching.202007121434.two_queues.h ├── Searching.202008170756.scale_m.cpp ├── Searching.202008170756.scale_m.h ├── Searching.202008251657.m_width.v2.cpp ├── Searching.202008251657.m_width.v2.h ├── Searching.202008281536.error_count.cpp ├── Searching.202008281536.error_count.h ├── Searching.202008310636.simple_v3.cpp ├── Searching.202008310636.simple_v3.h ├── Searching.202009171601.simple_v3.large_graph.cpp ├── Searching.202009171601.simple_v3.large_graph.h ├── Searching.202009201459.simple_search_large_graph.cpp ├── Searching.202009201459.simple_search_large_graph.h ├── Searching.202009221831.bfs_test_nsg.cpp ├── Searching.202009221831.bfs_test_nsg.h ├── Searching.202011131441.simple_v3.one_merge.cpp ├── Searching.202011131441.simple_v3.one_merge.h ├── Searching.202011131454.simple_v3.large_graph.one_merge.cpp ├── Searching.202011131454.simple_v3.large_graph.one_merge.h ├── Searching.202011241533.top_m_pure.cpp ├── Searching.202011241533.top_m_pure.h ├── Searching.202011241615.top_m_pure_large_graph.cpp ├── Searching.202011241615.top_m_pure_large_graph.h ├── Searching.202011241651.scale_m_pure.cpp ├── Searching.202011241651.scale_m_pure.h ├── Searching.202011241958.scale_m_pure_large_graph.cpp ├── Searching.202011241958.scale_m_pure_large_graph.h ├── Searching.202011301508.top_m_pure_large_graph.num_unchecked.cpp ├── Searching.202011301508.top_m_pure_large_graph.num_unchecked.h ├── Searching.202012041559.top_m_pure_large_graph.last_update_step.cpp ├── Searching.202012041559.top_m_pure_large_graph.last_update_step.h ├── Searching.202012071500.scale_m_pure_large_graph.num_unchecked.cpp ├── Searching.202012071500.scale_m_pure_large_graph.num_unchecked.h ├── Searching.202012122112.top_m_pure_large_graph.backtracking.cpp ├── Searching.202012122112.top_m_pure_large_graph.backtracking.h ├── Searching.202012141643.simple_v3.scale_M.cpp ├── Searching.202012141643.simple_v3.scale_M.h ├── Searching.202012141857.simple_v3.large_graph.scale_M.cpp ├── Searching.202012141857.simple_v3.large_graph.scale_M.h ├── Searching.202012191846.top_m_Ligra.cpp ├── Searching.202012191846.top_m_Ligra.h ├── Searching.202101081549.PSS_v4.profiling.cpp ├── Searching.202101081549.PSS_v4.profiling.h ├── Searching.202101081641.PSS_v4.large_graph.profiling.cpp ├── Searching.202101081641.PSS_v4.large_graph.profiling.h ├── Searching.202101081737.top_m_pure.profiling.cpp ├── Searching.202101081737.top_m_pure.profiling.h ├── Searching.202101081753.top_m_pure_large_graph.profiling.cpp ├── Searching.202101081753.top_m_pure_large_graph.profiling.h ├── Searching.202101081806.scale_m_pure.profiling.cpp ├── Searching.202101081806.scale_m_pure.profiling.h ├── Searching.202101081821.scale_m_pure_large_graph.profiling.cpp ├── Searching.202101081821.scale_m_pure_large_graph.profiling.h ├── Searching.202101301609.PSS_v5.profiling.cpp ├── Searching.202101301609.PSS_v5.profiling.h ├── Searching.202101301614.PSS_v5.large_graph.profiling.cpp ├── Searching.202101301614.PSS_v5.large_graph.profiling.h ├── Searching.202101311717.PSS_v5.global_queue.profiling.cpp ├── Searching.202101311717.PSS_v5.global_queue.profiling.h ├── Searching.202101311727.PSS_v5.large_graph.global_queue.profiling.cpp ├── Searching.202101311727.PSS_v5.large_graph.global_queue.profiling.h ├── Searching.202102022027.PSS_v5.dist_thresh.profiling.bak.cpp ├── Searching.202102022027.PSS_v5.dist_thresh.profiling.bak.h ├── Searching.202102022027.PSS_v5.dist_thresh.profiling.cpp ├── Searching.202102022027.PSS_v5.dist_thresh.profiling.h ├── Searching.202102031939.PSS_v5.large_graph.dist_thresh.profiling.cpp ├── Searching.202102031939.PSS_v5.large_graph.dist_thresh.profiling.h ├── Searching.202103101606.PSS_v5.large_graph.v_counter.cpp ├── Searching.202103101606.PSS_v5.large_graph.v_counter.h ├── Searching.202103101852.PSS_v5.large_graph.count_reorder.cpp ├── Searching.202103101852.PSS_v5.large_graph.count_reorder.h ├── Searching.202103141957.PSS_v5.large_graph.distance_step.cpp ├── Searching.202103141957.PSS_v5.large_graph.distance_step.h ├── Searching.202103152056.PSS_v5.large_graph.degree_reorder.cpp ├── Searching.202103152056.PSS_v5.large_graph.degree_reorder.h ├── Searching.202103191537.PSS_v5.sequence_traverse.cpp ├── Searching.202103191537.PSS_v5.sequence_traverse.h ├── Searching.202103191800.PSS_v5.sequence_traverse_B.cpp ├── Searching.202103191800.PSS_v5.sequence_traverse_B.h ├── Searching.202105281923.PSS_v5_LG_nn_distribution.cpp ├── Searching.202105281923.PSS_v5_LG_nn_distribution.h ├── Searching.202105302215.PSS_v5_LG_core_subgraph.cpp ├── Searching.202105302215.PSS_v5_LG_core_subgraph.h ├── Searching.202106051704.PSS_LG_bfs_subgraph.cpp ├── Searching.202106051704.PSS_LG_bfs_subgraph.h ├── Searching.202106170130.PSS_LG_bfs_parallel_path_subgraph.cpp ├── Searching.202106170130.PSS_LG_bfs_parallel_path_subgraph.h ├── Searching.202106251238.PSS_LG_bfs_parallel_path_w_nonmono_subgraph.cpp ├── Searching.202106251238.PSS_LG_bfs_parallel_path_w_nonmono_subgraph.h ├── Searching.202106261435.PSS_LG_bfs_parallel_path_2_steps_dist_prune.cpp ├── Searching.202106261435.PSS_LG_bfs_parallel_path_2_steps_dist_prune.h ├── Searching.202106261539.PSS_v5_LG_nn_distribution_2_steps_dist_prune.cpp ├── Searching.202106261539.PSS_v5_LG_nn_distribution_2_steps_dist_prune.h ├── Searching.202106271444.PSS_v6_radius_bound.cpp ├── Searching.202106271444.PSS_v6_radius_bound.h ├── Searching.202106271447.PSS_v6_LG_radius_bound.cpp ├── Searching.202106271447.PSS_v6_LG_radius_bound.h ├── Searching.202106271833.PSS_LG_bfs_path_from_17_vertices.cpp ├── Searching.202106271833.PSS_LG_bfs_path_from_17_vertices.h ├── Searching.202107291833.PSS_v5.multi_queries.cpp ├── Searching.202107291833.PSS_v5.multi_queries.h ├── Searching.202107292234.PSS_v5.multi_queries.LG.cpp ├── Searching.202107292234.PSS_v5.multi_queries.LG.h ├── Searching.202108160800.PSS_v5_K_values_LG.cpp ├── Searching.202108160800.PSS_v5_K_values_LG.h ├── Searching.202108171220.PSS_v5.separate_search.LG.cpp ├── Searching.202108171220.PSS_v5.separate_search.LG.h ├── Searching.202110151700.PSS_v5.LG.every_step_merge.cpp ├── Searching.202110151700.PSS_v5.LG.every_step_merge.h ├── Searching.202111050014.PSS_v5.worker_variation.LG.cpp ├── Searching.202111050014.PSS_v5.worker_variation.LG.h ├── Searching.202111110022.PSS_v5.index_adaptive_merge.LG.cpp ├── Searching.202111110022.PSS_v5.index_adaptive_merge.LG.h ├── Searching.202111152031.PSS_v5.index_adaptive_merge_L_master.LG.cpp ├── Searching.202111152031.PSS_v5.index_adaptive_merge_L_master.LG.h ├── Searching.202111171644.PSS_v5.worker_std_deviation.LG.cpp ├── Searching.202111171644.PSS_v5.worker_std_deviation.LG.h ├── Searching.202111210046.PSS_v5.LG.update_positions.cpp ├── Searching.202111210046.PSS_v5.LG.update_positions.h ├── Searching.202111251430.PSS_v5.LG.TQueue.ratio_1st_half.cpp ├── Searching.202111251430.PSS_v5.LG.TQueue.ratio_1st_half.h ├── Searching.202111301625.PSS_v5.LG.no_staged.cpp ├── Searching.202111301625.PSS_v5.LG.no_staged.h ├── Searching.202204210403.PSS_v5.large_graph.path_wise_every_step_merge.cpp ├── Searching.202204210403.PSS_v5.large_graph.path_wise_every_step_merge.h ├── Searching.cpp ├── Searching.h └── deprecated │ ├── Searching.20191114.1D-vector.bak.cpp │ ├── Searching.20191114.1D-vector.bak.h │ ├── Searching.20191114.2D-vector.bak.cpp │ ├── Searching.20191114.2D-vector.bak.h │ ├── Searching.201911151011.csr-graph.bak.cpp │ ├── Searching.201911151011.csr-graph.bak.h │ ├── Searching.201911151111.tuple-candidate.bak.cpp │ ├── Searching.201911151111.tuple-candidate.bak.h │ ├── Searching.201911151211.graph_transfer.bak.cpp │ ├── Searching.201911151211.graph_transfer.bak.h │ ├── Searching.201911151842.opt-graph_bad_parameters.cpp │ ├── Searching.201911151842.opt-graph_bad_parameters.h │ ├── Searching.201911161030.op-graph_good_parameters.cpp │ ├── Searching.201911161030.op-graph_good_parameters.h │ ├── Searching.201912061447.parallel_in_a_batch.cpp │ ├── Searching.201912061447.parallel_in_a_batch.h │ ├── Searching.201912091448.map_for_queries_ids.cpp │ ├── Searching.201912091448.map_for_queries_ids.h │ ├── Searching.201912161559.set_for_queue.cpp │ ├── Searching.201912161559.set_for_queue.h │ ├── Searching.202002101535.reorganization.cpp │ ├── Searching.202002101535.reorganization.h │ ├── Searching.202002141745.critical_omp_top_m.h │ ├── Searching.202002181409.local_queue_and_merge.h │ ├── Searching.202002201424.parallel_merge_local_queues.h │ ├── Searching.202002250815.buckets_equal_width.h │ ├── Searching.202003021000.profile_para_top_m_search.h │ ├── Searching.202004131634.better_merge.h │ ├── Searching.202006191549.nested_parallel.h │ ├── Searching.202006222053.subsearch.h │ ├── Searching.202007121434.two_queues.atomic.h │ ├── Searching.202007270051.subsearch.profile.h │ ├── Searching.202007271527.gather_top_m.subsearch.h │ ├── Searching.202007271719.gather_top_m.subsearch.profile.h │ ├── Searching.202007281116.only_gather_top_m.profile.h │ ├── Searching.202007281234.only_gather_top_m.h │ ├── Searching.202007291720.hierarchy.h │ ├── Searching.202008061153.less_sync.h │ ├── Searching.202008062049.computation_quota.bak.h │ ├── Searching.202008062049.computation_quota.h │ ├── Searching.202008062049.computation_quota.profile.h │ ├── Searching.202008062049.computation_quota.sections.h │ ├── Searching.202008090117.interval_merge.cpp │ ├── Searching.202008090117.interval_merge.h │ ├── Searching.202008101718.interval_merge_v2.cpp │ ├── Searching.202008101718.interval_merge_v2.h │ ├── Searching.202008141252.interval_merge_v4.cpp │ ├── Searching.202008141252.interval_merge_v4.h │ ├── Searching.202008152055.interval_merge_v5.cpp │ ├── Searching.202008152055.interval_merge_v5.h │ ├── Searching.202008211350.simple_top_m.cpp │ ├── Searching.202008211350.simple_top_m.h │ ├── Searching.202008231534.m_width.cpp │ ├── Searching.202008231534.m_width.h │ ├── Searching.202008310636.simple_v3.bak.cpp │ ├── Searching.202008310636.simple_v3.bak.h │ ├── Searching.202008310636.simple_v3.bak.strange.cpp │ ├── Searching.202008310636.simple_v3.bak.strange.h │ ├── Searching.202009021917.simple_v3.profile.cpp │ ├── Searching.202009021917.simple_v3.profile.h │ ├── Searching.202009231959.simple_v3.large_graph_v2.cpp │ ├── Searching.202009231959.simple_v3.large_graph_v2.h │ ├── Searching.202009301055.simple_v3.large_graph.debug_for_deep100M.cpp │ ├── Searching.202009301055.simple_v3.large_graph.debug_for_deep100M.h │ ├── Searching.202010212125.simple_v3.metric_mean.cpp │ ├── Searching.202010212125.simple_v3.metric_mean.h │ ├── Searching.202010231417.simple_v3.heuristic_X.cpp │ ├── Searching.202010231417.simple_v3.heuristic_X.h │ ├── Searching.202010231647.simple_v3.large_graph.heuristic_X.cpp │ ├── Searching.202010231647.simple_v3.large_graph.heuristic_X.h │ ├── Searching.202010291522.simple_v3.num_checked.bak.cpp │ ├── Searching.202010291522.simple_v3.num_checked.bak.h │ ├── Searching.202010291522.simple_v3.num_checked.bak2.cpp │ ├── Searching.202010291522.simple_v3.num_checked.bak2.h │ ├── Searching.202010291522.simple_v3.num_checked.cpp │ ├── Searching.202010291522.simple_v3.num_checked.h │ ├── Searching.202010301220.simple_v3.large_graph.num_checked.cpp │ ├── Searching.202010301220.simple_v3.large_graph.num_checked.h │ ├── Searching.202011011451.simple_v3.std_dev.cpp │ ├── Searching.202011011451.simple_v3.std_dev.h │ ├── Searching.202011051142.simple_v3.large_graph.stddev_metric.cpp │ ├── Searching.202011051142.simple_v3.large_graph.stddev_metric.h │ ├── Searching.202011111604.simple_v3.large_graph.worst_and_best_unchecked.cpp │ └── Searching.202011111604.simple_v3.large_graph.worst_and_best_unchecked.h ├── gpu_faiss ├── 1-Flat.cc ├── 4-GPU.cu └── CMakeLists.txt ├── include ├── Buckets.h ├── Candidate.h ├── Neighbor.h ├── PCM │ ├── CMakeLists.txt │ ├── Dockerfile │ ├── Doxyfile │ ├── LICENSE │ ├── README.md │ ├── appveyor.yml │ ├── doc │ │ ├── CUSTOM-COMPILE-OPTIONS.md │ │ ├── DOCKER_README.md │ │ ├── ENVVAR_README.md │ │ ├── FAQ.md │ │ ├── FREEBSD_HOWTO.txt │ │ ├── KSysGuard HOWTO.docx │ │ ├── KSysGuard HOWTO.pdf │ │ ├── LINUX_HOWTO.txt │ │ ├── MAC_HOWTO.txt │ │ ├── PCM-EXPORTER.md │ │ ├── PCM-SENSOR-SERVER-README.md │ │ ├── PCM_RAW_README.md │ │ ├── WINDOWS_HOWTO.md │ │ ├── license.txt │ │ └── run-as-administrator.png │ ├── docker-compose.yml │ ├── examples │ │ ├── CMakeLists.txt │ │ └── c_example.c │ ├── pcm.spec │ ├── scripts │ │ ├── convert_edp_list.sh │ │ ├── cppcheck.sh │ │ ├── find_field.awk │ │ ├── find_field.sh │ │ ├── get_sles_bins.sh │ │ ├── grafana │ │ │ ├── README.md │ │ │ ├── automatic_influxdb.yml │ │ │ ├── automatic_prometheus.yml │ │ │ ├── prometheus.yml.template │ │ │ ├── provisioning │ │ │ │ └── dashboards │ │ │ │ │ └── pcm-provider.yml │ │ │ ├── start-prometheus.sh │ │ │ ├── start.sh │ │ │ ├── stop.sh │ │ │ └── telegraf.conf.template │ │ ├── pcm-background.sh │ │ ├── pcm-exporter │ │ ├── pcm-stop.sh │ │ ├── pcm.plot │ │ ├── pmu-query.py │ │ ├── readmem.sh │ │ ├── single_header.awk │ │ └── single_header.sh │ ├── src │ │ ├── CMakeLists.txt │ │ ├── MacMSRDriver │ │ │ ├── CMakeLists.txt │ │ │ ├── DriverInterface.c │ │ │ ├── DriverInterface.h │ │ │ ├── MSRAccessor.cpp │ │ │ ├── MSRAccessor.h │ │ │ ├── MSRAccessorPublic.h │ │ │ ├── MSRKernel.h │ │ │ ├── PCIDriverInterface.cpp │ │ │ ├── PCIDriverInterface.h │ │ │ ├── PcmMsr.xcodeproj │ │ │ │ ├── project.pbxproj │ │ │ │ ├── project.xcworkspace │ │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ │ └── xcuserdata │ │ │ │ │ │ ├── aiott.xcuserdatad │ │ │ │ │ │ └── UserInterfaceState.xcuserstate │ │ │ │ │ │ └── pjkerly.xcuserdatad │ │ │ │ │ │ └── UserInterfaceState.xcuserstate │ │ │ │ └── xcuserdata │ │ │ │ │ ├── aiott.xcuserdatad │ │ │ │ │ ├── xcdebugger │ │ │ │ │ │ └── Breakpoints.xcbkptlist │ │ │ │ │ └── xcschemes │ │ │ │ │ │ ├── PcmMsr.xcscheme │ │ │ │ │ │ ├── PcmMsrLibrary.xcscheme │ │ │ │ │ │ └── xcschememanagement.plist │ │ │ │ │ └── pjkerly.xcuserdatad │ │ │ │ │ └── xcschemes │ │ │ │ │ ├── PcmMsrDriver.xcscheme │ │ │ │ │ ├── PcmMsrLibrary.xcscheme │ │ │ │ │ └── xcschememanagement.plist │ │ │ ├── PcmMsr │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── PcmMsr-Info.plist │ │ │ │ ├── PcmMsr.cpp │ │ │ │ ├── PcmMsr.h │ │ │ │ ├── PcmMsrClient.cpp │ │ │ │ ├── PcmMsrClient.h │ │ │ │ ├── PcmMsrDriver_info.c │ │ │ │ ├── UserKernelShared.h │ │ │ │ └── en.lproj │ │ │ │ │ └── InfoPlist.strings │ │ │ ├── kextload.sh │ │ │ └── kextunload.sh │ │ ├── PMURegisterDeclarations │ │ │ ├── GenuineIntel-6-55-4.json │ │ │ ├── GenuineIntel-6-55-7.json │ │ │ ├── GenuineIntel-6-6A-6.json │ │ │ └── GenuineIntel-6-8E-C.json │ │ ├── WinMSRDriver │ │ │ ├── MSR.inf │ │ │ ├── MSR.vcxproj │ │ │ ├── makefile │ │ │ ├── msr.h │ │ │ ├── msrmain.c │ │ │ ├── msrstruct.h │ │ │ └── sources │ │ ├── bw.cpp │ │ ├── bw.h │ │ ├── client │ │ │ ├── .cproject │ │ │ ├── .project │ │ │ ├── client.cpp │ │ │ ├── client.h │ │ │ └── main.cpp │ │ ├── cpuasynchcounter.h │ │ ├── cpucounters.cpp │ │ ├── cpucounters.h │ │ ├── daemon │ │ │ ├── .cproject │ │ │ ├── .gitignore │ │ │ ├── common.h │ │ │ ├── daemon.cpp │ │ │ ├── daemon.h │ │ │ ├── main.cpp │ │ │ └── pcm.h │ │ ├── dashboard.cpp │ │ ├── dashboard.h │ │ ├── dashboardtest.cpp │ │ ├── debug.cpp │ │ ├── debug.h │ │ ├── exceptions │ │ │ └── unsupported_processor_exception.hpp │ │ ├── favicon.ico.h │ │ ├── freegetopt │ │ │ ├── ChangeLog │ │ │ ├── LICENSE │ │ │ ├── README │ │ │ ├── getopt.cpp │ │ │ └── getopt.h │ │ ├── lspci.h │ │ ├── memoptest.cpp │ │ ├── mmio.cpp │ │ ├── mmio.h │ │ ├── msr.cpp │ │ ├── msr.h │ │ ├── msrtest.cpp │ │ ├── mutex.h │ │ ├── opCode-106.txt │ │ ├── opCode-134.txt │ │ ├── opCode-85.txt │ │ ├── pci.cpp │ │ ├── pci.h │ │ ├── pcm-bw-histogram.sh │ │ ├── pcm-core.cpp │ │ ├── pcm-iio.cpp │ │ ├── pcm-latency.cpp │ │ ├── pcm-lspci.cpp │ │ ├── pcm-memory.cpp │ │ ├── pcm-mmio.cpp │ │ ├── pcm-msr.cpp │ │ ├── pcm-numa.cpp │ │ ├── pcm-pcicfg.cpp │ │ ├── pcm-pcie.cpp │ │ ├── pcm-pcie.h │ │ ├── pcm-power.cpp │ │ ├── pcm-raw.cpp │ │ ├── pcm-sensor-server.cpp │ │ ├── pcm-sensor.cpp │ │ ├── pcm-tsx.cpp │ │ ├── pcm.cpp │ │ ├── readmem.cpp │ │ ├── realtime.cpp │ │ ├── resctrl.cpp │ │ ├── resctrl.h │ │ ├── simdjson_wrapper.cpp │ │ ├── simdjson_wrapper.h │ │ ├── threadpool.cpp │ │ ├── threadpool.h │ │ ├── topology.cpp │ │ ├── topology.h │ │ ├── types.h │ │ ├── utils.cpp │ │ ├── utils.h │ │ ├── version.h │ │ ├── width_extender.h │ │ ├── windows │ │ │ ├── AssemblyInfo.cpp │ │ │ ├── PCM-Service.exe.config │ │ │ ├── PCMInstaller.cpp │ │ │ ├── PCMInstaller.h │ │ │ ├── PCMService.cpp │ │ │ ├── PCMService.h │ │ │ ├── PCM_cpp_ReadMe.txt │ │ │ ├── ReadMe_PCMService.txt │ │ │ ├── dllmain.cpp │ │ │ ├── pcm-core-win.cpp │ │ │ ├── pcm-iio-win.cpp │ │ │ ├── pcm-latency-win.cpp │ │ │ ├── pcm-lib.cpp │ │ │ ├── pcm-lib.h │ │ │ ├── pcm-lspci-win.cpp │ │ │ ├── pcm-memory-win.cpp │ │ │ ├── pcm-mmio-win.cpp │ │ │ ├── pcm-msr-win.cpp │ │ │ ├── pcm-numa-win.cpp │ │ │ ├── pcm-pcicfg-win.cpp │ │ │ ├── pcm-pcie-win.cpp │ │ │ ├── pcm-power-win.cpp │ │ │ ├── pcm-raw-win.cpp │ │ │ ├── pcm-tsx-win.cpp │ │ │ ├── pcm.cpp │ │ │ ├── pcm_lib_ReadMe.txt │ │ │ ├── pcm_power_ReadMe.txt │ │ │ ├── restrictDriverAccess.cpp │ │ │ ├── stdafx.cpp │ │ │ ├── stdafx.h │ │ │ └── windriver.h │ │ ├── winpmem │ │ │ ├── LICENSE.txt │ │ │ ├── winpmem.cpp │ │ │ └── winpmem.h │ │ └── winring0 │ │ │ ├── COPYRIGHT.txt │ │ │ ├── OlsApi.h │ │ │ ├── OlsApiInit.h │ │ │ ├── OlsApiInitDef.h │ │ │ ├── OlsApiInitExt.h │ │ │ └── OlsDef.h │ └── tests │ │ ├── CMakeLists.txt │ │ ├── daemon_alignment_test.cpp │ │ ├── test.sh │ │ └── urltest.cpp ├── Runtime.h ├── Spinlock.h ├── bitvector.h ├── definitions.h ├── deprecated │ └── utils.cpp ├── efanna2e │ ├── distance.h │ ├── exceptions.h │ ├── index.cpp │ ├── index.h │ ├── index_nsg.20191114.vector_norms.cpp │ ├── index_nsg.20191114.vector_norms.h │ ├── index_nsg.20201002.bak.cpp │ ├── index_nsg.20201002.bak.h │ ├── index_nsg.202011301613.num_unchecked.cpp │ ├── index_nsg.202011301613.num_unchecked.h │ ├── index_nsg.202012041718.last_update_step.cpp │ ├── index_nsg.202012041718.last_update_step.h │ ├── index_nsg.202012111616.backtracking.cpp │ ├── index_nsg.202012111616.backtracking.h │ ├── index_nsg.202101172012.omp.cpp │ ├── index_nsg.202101172012.omp.h │ ├── index_nsg.202101181119.omp_profile.cpp │ ├── index_nsg.202101181119.omp_profile.h │ ├── index_nsg.202103121531.neighbor_distance_step.cpp │ ├── index_nsg.202103121531.neighbor_distance_step.h │ ├── index_nsg.202104211705.findroot.cpp │ ├── index_nsg.202104211705.findroot.h │ ├── index_nsg.202204201951.omp_profile_multi_queues.cpp │ ├── index_nsg.202204201951.omp_profile_multi_queues.h │ ├── index_nsg.cpp │ ├── index_nsg.h │ ├── neighbor.h │ ├── parameters.h │ └── util.h ├── hnswlib │ ├── bruteforce.h │ ├── hnswalg.h │ ├── hnswlib.h │ ├── space_ip.h │ ├── space_l2.h │ └── visited_list_pool.h ├── ligra │ ├── IO.h │ ├── binary_search.h │ ├── blockRadixSort.h │ ├── bucket.h │ ├── byte-pd.h │ ├── byte.h │ ├── byteRLE-pd.h │ ├── byteRLE.h │ ├── compressedVertex.h │ ├── counting_sort.h │ ├── decoder.C │ ├── dyn_arr.h │ ├── edgeMapReduce.h │ ├── edgeMap_utils.h │ ├── encoder.C │ ├── gettime.h │ ├── graph.h │ ├── histogram.h │ ├── hygra.h │ ├── hypergraphDecoder.C │ ├── hypergraphEncoder.C │ ├── hypergraphIO.h │ ├── index_map.h │ ├── ligra.h │ ├── maybe.h │ ├── nibble-pd.h │ ├── nibble.h │ ├── parallel.h │ ├── parseCommandLine.h │ ├── quickSort.h │ ├── sequence.h │ ├── sequentialHT.h │ ├── transpose.h │ ├── utils.h │ ├── vertex.h │ └── vertexSubset.h ├── papi_panns.h ├── parallelization.h ├── pcm_mem.cpp ├── pcm_mem.h ├── utils.cpp └── utils.h ├── notes ├── pseudo_graphit_for_anns.cpp ├── pseudo_hierarchical_merge.cpp ├── pseudo_parallel-search.cpp ├── pseudo_top_m_by_Ligra.cpp └── pseudo_two_queues_search.cpp ├── scripts ├── bg7 │ ├── sh.sh │ ├── sh0.hnsw_index.sh │ ├── sh0.hnsw_index_deep1b.sh │ ├── sh1.hnsw_search.sh │ ├── sh100.PSS_v5_find_L_TQueue_ratio_1st_half.sh │ ├── sh129.PSS_v5_find_L_no_staged_deep100m.sh │ ├── sh130.NSG_omp_sift1m_profile_sync_overhead.sh │ ├── sh131.NSG_omp_deep100m_profile_sync_overhead.sh │ ├── sh132.insert_NSG_omp_sift1m_profile_sync_overhead.sh │ ├── sh133.insert_NSG_omp_deep100m_profile_sync_overhead.sh │ ├── sh2.iter_mean.sh │ ├── sh26.gist1m_re-do_PSS.sh │ ├── sh27.deep10m_re-do_PSS.sh │ ├── sh28.sift100m_re-do_PSS.sh │ ├── sh29.deep100m_re-do_PSS.sh │ ├── sh3.stddev.sh │ ├── sh30.sift1m_re-do_PSS.sh │ ├── sh4.stddev_samples.sh │ ├── sh5.num_checked_x.sh │ ├── sh59.hnsw_sift1m.sh │ ├── sh6.top_1_worst.sh │ ├── sh60.hnsw_gist1m.sh │ ├── sh61.hnsw_deep10m.sh │ ├── sh62.hnsw_sift100m.sh │ ├── sh63.hnsw_deep100m.sh │ ├── sh64.hnsw_deep1b.sh │ ├── sh65.hnsw_sift1b.sh │ ├── sh69.PSS_v5_dt_profiling_deep1m.sh │ ├── sh7.top_m_sift1m.sh │ ├── sh70.PSS_v5_dt_profiling_deep1b.sh │ ├── sh71.PSS_v5_dt_profiling_sift1b.sh │ ├── sh72.NSG_seq_sift1b.sh │ ├── sh74.NSG_seq_deep1b.sh │ ├── sh75.PSS_v5_dt_profiling_sift1m.sh │ ├── sh76.hnsw_deep1b.sh │ ├── sh78.PSS_v5_dt_profiling_T1_deep10m_degree.sh │ ├── sh79.PSS_v5_dt_profiling_T16_sift1m_degree.sh │ ├── sh79.nsg_index_sift1m_R.sh │ ├── sh80.PSS_search_subgraph_sift1m.sh │ ├── sh81.PSS_search_subgraph_gist1m.sh │ ├── sh82.PSS_search_subgraph_deep10m.sh │ ├── sh83.PSS_search_subgraph_sift100m.sh │ ├── sh84.PSS_search_subgraph_deep100m.sh │ ├── sh85.PSS_search_subgraph_core_only_sift1m.sh │ ├── sh86.PSS_search_subgraph_core_only_gist1m.sh │ ├── sh87.PSS_search_subgraph_core_only_deep10m.sh │ ├── sh88.PSS_search_subgraph_core_only_sift100m.sh │ ├── sh89.PSS_search_subgraph_core_only_deep100m.sh │ ├── sh90.PSS_search_subgraph_w_nonmono_sift1m.sh │ ├── sh91.PSS_search_subgraph_2_steps_dist_prune_sift1m.sh │ ├── sh92.PSS_v5_nn_distribution_2_step_dist_prune.sh │ ├── sh93.PSS_v5_work_variation.sh │ ├── sh94.PSS_v5_find_L_every_step_merge_fixed_local_L_deep100m.sh │ ├── sh95.PSS_v5_find_L_fixed_local_L_update_positions_deep100m.sh │ ├── sh96.PSS_v5_find_L_fixed_local_L_update_positions_deep100m.sh │ ├── sh97.PSS_v5_find_L_every_step_merge_deep100m.sh │ ├── sh98.PSS_v5_find_L_index_adaptive_merge_deep100m_sift100m.sh │ ├── sh99.PSS_v5_find_L_index_adaptive_merge_L_master_deep100m_sift100m.sh │ └── test1.generate_and_upload.sh ├── combine_five_cols.py ├── combine_four_cols.py ├── combine_two_cols.py ├── cpuinfo.py ├── deprecated │ ├── curve.pitzer.profile_para_simple_search.subsearch.sh │ ├── curve.pitzer.profile_para_top_m_search.interval_merge.sh │ ├── curve.pitzer.profile_para_top_m_search.middle-M-4.sh │ ├── curve.pitzer.profile_para_top_m_search.selecting_lth.sh │ ├── curve.pitzer.profile_para_top_m_search.subsearch.sh │ ├── curve.skylake.profile_para_top_m_search.middle-M-4.sh │ ├── curve_app_seq_searching.sh │ ├── curve_app_top_m_seq_search.sh │ ├── curve_engine.sh │ ├── curve_profile_para_single_query_top_m_search.sh │ ├── load.top_m_seq.sh │ ├── no_omp_simple_profile.sh │ ├── nsg_simple_profile.sh │ ├── performance_engine.sh │ ├── pitzer.load.curve_middle-M-4.sh │ ├── pitzer.load.curve_selecting_lth.sh │ ├── pitzer.load.curve_simple_search.sh │ ├── pitzer.load.curve_simple_search_subsearch.sh │ ├── pitzer.load.curve_subsearch.sh │ ├── pitzer.load.dist_threshold+middle_iteration.sh │ ├── pitzer.load.performance_batched.sh │ ├── pitzer.load.performance_middle-M-4.sh │ ├── pitzer.load.performance_subsearch.sh │ ├── pitzer.load.sh │ ├── profile.knl.profile_para_top_m.sh │ ├── profile.pitzer.profile_para_simple_search.subsearch.sh │ ├── profile.pitzer.profile_para_top_m.dist_threshold+middle_iteration.sh │ ├── profile.pitzer.profile_para_top_m.dist_threshold.sh │ ├── profile.pitzer.profile_para_top_m.middle-m-4.cache_miss.sh │ ├── profile.pitzer.profile_para_top_m.middle-m-4.no_merge.sh │ ├── profile.pitzer.profile_para_top_m.middle-m-4.study.sh │ ├── profile.pitzer.profile_para_top_m.nested_batch_size.sh │ ├── profile.pitzer.profile_para_top_m.selecting_out.sh │ ├── profile.pitzer.profile_para_top_m.subsearch.sh │ ├── profile_value_m.py │ ├── run_multi_threads.sh │ ├── sh.sh │ ├── simple_profile_app_para_simple_search.sh │ ├── simple_profile_app_simple_search.sh │ ├── simple_profile_app_top_m_seq_search.sh │ ├── simple_profile_profile_batch_top_m_embarrassing_para.sh │ ├── simple_profile_profile_top_m.sh │ ├── simple_profile_profile_top_m_no_local_arrays.sh │ ├── simple_searching.sh │ ├── test.sh │ ├── test10.only_gather.large_L.sh │ ├── test10.only_gather.sh │ ├── test11.multi_queries.sh │ ├── test12.simple_para.sh │ ├── test13.hierarchy.sh │ ├── test14.less_sync.sh │ ├── test15.interval_merge.sh │ ├── test16.skylake_interval_merge.sh │ ├── test17.interval_merge_v2.sh │ ├── test18.interval_merge_v3.sh │ ├── test19.skylake_interval_merge_v3.sh │ ├── test2.sh │ ├── test20.curve_interval_merge.sh │ ├── test21.interval_merge_v4.sh │ ├── test22.interval_merge_v5.sh │ ├── test23.scale_m_seq.sh │ ├── test24.top_m_seq.sh │ ├── test25.middle_m_seq.sh │ ├── test26.simple_search_seq.sh │ ├── test27.curve_simple_search.sh │ ├── test28.top_m_para.sh │ ├── test29.simple_top_m_v1.sh │ ├── test3.sh │ ├── test30.m_width_v1.sh │ ├── test31.simple_top_m_v2.sh │ ├── test32.m_width_v2.sh │ ├── test33.find_L_simple_search_seq.sh │ ├── test34.error_count_v1.sh │ ├── test35.simple_v3.sh │ ├── test36.curve_simple_v3.sh │ ├── test37.find_L_simple_v3.sh │ ├── test38.find_X_simple_v3.sh │ ├── test39.profile_runtime_simple_v3.sh │ ├── test4.select_mth.large_L.sh │ ├── test4.select_mth.sh │ ├── test40.simple_v3_full_X.sh │ ├── test41.simple_v3_increase_X.py │ ├── test42.simple_v3_no_terminat_increase_X.py │ ├── test43.simple_v3_ranged_L.bak.py │ ├── test44.save_true_NN.py │ ├── test45.large_graph_simple_v3.py │ ├── test46.find_L_simple_search_large_graph.py │ ├── test47.simple_v3_large_graph_ranged_L.py │ ├── test48.simple_v3_large_graph_ranged_L_v2.py │ ├── test49.find_L_SV3_T1_large_graph.py │ ├── test5.profile.sh │ ├── test51.increase_X_SV3_T8_large_graph.py │ ├── test52.decrease_X_SV3_T8_large_graph.py │ ├── test53.increase_X_SV3_T8.py │ ├── test54.decrease_X_SV3_T8.py │ ├── test55.double_X_SV3_T8.py │ ├── test56.half_X_SV3_T8.py │ ├── test57.increase_X_SV3.py │ ├── test58.increase_X_SV3_large_graph.py │ ├── test59.checked_mean_simple_v3_ranged_L.py │ ├── test6.gather_top_m.sh │ ├── test60.checked_mean_simple_v3_large_graph_ranged_L.py │ ├── test61.one_merge_find_L_SV3_T1.py │ ├── test62.one_merge_find_L_SV3_T1_large_graph.py │ ├── test7.middle_m.large_L.sh │ ├── test7.middle_m.sh │ ├── test8.compound.sh │ ├── test9.profile.only_gather.sh │ ├── visited_array_simple_profile.sh │ └── yes_omp_simple_profile.sh ├── knl │ ├── deprecated │ │ ├── sh.sh │ │ ├── sh1.SGS_sift100M_find_L.sh │ │ ├── sh10.increase_X_sift1M_T8.sh │ │ ├── sh11.decrease_X_sift1M_T8.sh │ │ ├── sh12.double_X_sift1M_T8.sh │ │ ├── sh13.half_X_sift1M_T8.sh │ │ ├── sh14.increase_X_sift1M.sh │ │ ├── sh15.increase_X_large_graph.sh │ │ ├── sh16.sift1m_re-do_PSS.sh │ │ ├── sh17.sift1m_re-do_SGS.sh │ │ ├── sh18.checked_mean.sh │ │ ├── sh19.checked_mean_large_graph.sh │ │ ├── sh2.PSS_sift100M_T1_find_L.sh │ │ ├── sh20.sift100m_re-do_PSS.sh │ │ ├── sh3.PSS_sift100M_T8.sh │ │ ├── sh4.PSS_sift100M_T4.sh │ │ ├── sh5.PSS_sift100M_T2.sh │ │ ├── sh6.heuristic_X.sh │ │ ├── sh7.SGS_deep100M_find_L.sh │ │ ├── sh8.increase_X_sift100M_T8.sh │ │ ├── sh9.decrease_X_sift100M_T8.sh │ │ ├── test49.0.90-0.98.find_L_SV3_T1_large_graph.py │ │ ├── test49.0.990-0.995.find_L_SV3_T1_large_graph.py │ │ ├── test49.0.996.find_L_SV3_T1_large_graph.py │ │ ├── test49.0.997.find_L_SV3_T1_large_graph.py │ │ ├── test49.0.998.find_L_SV3_T1_large_graph.py │ │ ├── test49.0.999.find_L_SV3_T1_large_graph.py │ │ └── test49.find_L_SV3_T1_large_graph.py │ ├── sh.sh │ ├── sh0.NSG_omp_bdw.sh │ ├── sh0.NSG_seq_bdw.sh │ ├── sh0.vtune_PSS_v4_profiling_gist1m.sh │ ├── sh1.vtune_PSS_v4_profiling_sift1m.sh │ ├── sh100.PSS_v5_perf_gist1m.sh │ ├── sh101.PSS_v5_perf_deep100m.sh │ ├── sh102.PSS_v5_nn_distribution.sh │ ├── sh103.plot_graph.sh │ ├── sh104.PSS_v6_radius_bound_sift1m.sh │ ├── sh105.PSS_v5_reorder_deep100m_redo.sh │ ├── sh106.PSS_v5_multi_queries.sh │ ├── sh107.PSS_v5_multi_queries_LG.sh │ ├── sh108.baseline_multi_queries.sh │ ├── sh109.baseline_multi_queries_LG.sh │ ├── sh11.top_m_sift1m.sh │ ├── sh110.two_buddies_multi_queries.sh │ ├── sh111.two_buddies_multi_queries_LG.sh │ ├── sh112.PSS_v5_multi_queries_load_balance.sh │ ├── sh113.PSS_v5_multi_queries_load_balance_LG.sh │ ├── sh114.PSS_v5_multi_queries_cpu_affinity.sh │ ├── sh115.PSS_v5_multi_queries_LG_cpu_affinity.sh │ ├── sh116.PSS_v5_sense_L&X.sh │ ├── sh117.PSS_v5_K_10_deep100m.sh │ ├── sh118.Separate_Search_deep100msh │ ├── sh119.PSS_v5_K_1_deep100m.sh │ ├── sh12.top_m_gist1m.sh │ ├── sh120.PSS_v5_find_L_only_once_merge_deep100m.sh │ ├── sh121.PSS_v5_find_L_only_once_merge_L_master_deep100m.sh │ ├── sh122.PSS_v5_find_L_merge_every_step_deep100m.sh │ ├── sh123.PSS_v5_find_L_only_once_merge_L_master_sift1m.sh │ ├── sh124.PSS_v5_find_L_merge_every_2_step_deep100m.sh │ ├── sh125.PSS_v5_find_L_index_adaptive_merge_deep100m_sift100m.sh │ ├── sh126.PSS_v5_find_L_index_adaptive_merge_L_master_deep100m_sift100m.sh │ ├── sh127.PSS_v5_find_L_every_step_merge_fixed_local_L_deep100m.sh │ ├── sh128.PSS_v5_find_L_no_staged_deep100m.sh │ ├── sh129.PSS_v5_find_L_no_staged_deep100m.sh │ ├── sh13.top_m_deep10m.sh │ ├── sh130.NSG_omp_sift1m_profile_sync_overhead.sh │ ├── sh131.NSG_omp_deep100m_profile_sync_overhead.sh │ ├── sh132.PSS_v5_find_L_path_wise_every_step_merge_LG_deep100m.sh │ ├── sh133.PSS_v5_deep100m_for_bdw.sh │ ├── sh134.PSS_v5_adaptive_merge_deep100m_for_bdw.sh │ ├── sh135.pcm_mem_NSG_LG.sh │ ├── sh136.pcm_mem_NSG_inter_query_LG.sh │ ├── sh137.pcm_mem_NSG_omp_LG.sh │ ├── sh138.pcm_mem_PSS_v5_find_L_index_adaptive_merge_L_master_LG.sh │ ├── sh139.pcm_mem_PSS_v5_LG.sh │ ├── sh14.top_m_sift100m.sh │ ├── sh140.pcm_mem_PathWise_every_step_merge_LG.sh │ ├── sh141.pcm_mem_NoStaged_LG.sh │ ├── sh142.pcm_mem_NoSync_once_merge_L_master_LG.sh │ ├── sh143.NSG_omp_mem_bdw_deep100m.sh │ ├── sh144.PSS_v5_mem_bdw_deep100m.sh │ ├── sh145.PSS_v5_adaptive_merge_L_master_mem_bdw_deep100m.sh │ ├── sh146.PathWise_every_step_merge_LG_mem_bdw_deep100m.sh │ ├── sh147.NoStaged_mem_bdw_deep100m.sh │ ├── sh148.NoSync_mem_bdw_deep100m.sh │ ├── sh149.scale_m_profiling_deep100m.sh │ ├── sh15.top_m_deep100m.sh │ ├── sh150.PSS_v5_multi_queries_tuning_intra_LG.sh │ ├── sh16.scale_m_sift1m.sh │ ├── sh17.scale_m_gist1m.sh │ ├── sh18.scale_m_deep10m.sh │ ├── sh19.scale_m_sift100m.sh │ ├── sh2.vtune_PSS_v4_profiling_deep10m.sh │ ├── sh20.scale_m_deep100m.sh │ ├── sh22.X_and_L.sh │ ├── sh23.X_and_L2_from_L1.sh │ ├── sh24.X_and_L2_from_L2.sh │ ├── sh25.one_merge.sh │ ├── sh26.gist1m_re-do_PSS.sh │ ├── sh27.deep10m_re-do_PSS.sh │ ├── sh28.sift100m_re-do_PSS.sh │ ├── sh29.deep100m_re-do_PSS.sh │ ├── sh30.sift1m_re-do_PSS.sh │ ├── sh31.top_m_sift1m_find_M.sh │ ├── sh32.top_m_gist1m_find_M.sh │ ├── sh33.top_m_deep10m_find_M.sh │ ├── sh34.PSS_Scale_M_sift1m.sh │ ├── sh35.PSS_Scale_M_gist1m.sh │ ├── sh36.PSS_Scale_M_deep10m.sh │ ├── sh37.PSS_Scale_M_sift100m.sh │ ├── sh38.PSS_Scale_M_deep100m.sh │ ├── sh39.PSS_v4_profiling_sift1m.sh │ ├── sh40.PSS_v4_profiling_gist1m.sh │ ├── sh41.PSS_v4_profiling_deep10m.sh │ ├── sh42.PSS_v4_profiling_sift100m.sh │ ├── sh43.PSS_v4_profiling_deep100m.sh │ ├── sh44.top_m_profiling_sift1m.sh │ ├── sh45.top_m_profiling_gist1m.sh │ ├── sh46.top_m_profiling_deep10m.sh │ ├── sh47.top_m_profiling_sift100m.sh │ ├── sh48.top_m_profiling_deep100m.sh │ ├── sh49.scale_m_profiling_sift1m.sh │ ├── sh50.scale_m_profiling_gist1m.sh │ ├── sh51.scale_m_profiling_deep10m.sh │ ├── sh52.scale_m_profiling_sift100m.sh │ ├── sh53.scale_m_profiling_deep100m.sh │ ├── sh54.NSG_omp_sift1m.sh │ ├── sh55.NSG_omp_gist1m.sh │ ├── sh56.NSG_omp_deep10m.sh │ ├── sh57.NSG_omp_sift100m.sh │ ├── sh58.NSG_omp_deep100m.sh │ ├── sh59.hnsw_sift1m.sh │ ├── sh60.hnsw_gist1m.sh │ ├── sh61.hnsw_deep10m.sh │ ├── sh62.hnsw_sift100m.sh │ ├── sh63.hnsw_deep100m.sh │ ├── sh64.PSS_v5_profiling_sift1m.sh │ ├── sh65.PSS_v5_profiling_gist1m.sh │ ├── sh66.PSS_v5_profiling_deep10m.sh │ ├── sh67.PSS_v5_profiling_sift100m.sh │ ├── sh68.PSS_v5_profiling_deep100m.sh │ ├── sh69.PSS_v5_dt_profiling_sift1m.sh │ ├── sh70.PSS_v5_dt_profiling_gist1m.sh │ ├── sh71.PSS_v5_dt_profiling_deep10m.sh │ ├── sh72.PSS_v5_dt_profiling_sift100m.sh │ ├── sh73.PSS_v5_dt_profiling_deep100m.sh │ ├── sh74.NSG_seq_deep1m.sh │ ├── sh75.hnsw_deep1m.sh │ ├── sh76.PSS_v5_dt_profiling_deep1m.sh │ ├── sh77.PSS_v5_degree_reorder_sift1m.sh │ ├── sh78.PSS_v5_degree_reorder_sift100m.sh │ ├── sh79.PSS_v5_degree_reorder_deep100m.sh │ ├── sh80.PSS_v5_degree_reorder_deep10m.sh │ ├── sh87.PSS_v5_perf_sift1m.sh │ ├── sh88.PSS_v5_reorder_perf_sift1m.sh │ ├── sh89.PSS_v5_perf_sift100m.sh │ ├── sh90.PSS_v5_reorder_perf_sift100m.sh │ ├── sh91.NSG_omp_sift1m_for_bdw.sh │ ├── sh92.NSG_omp_gist1m_for_bdw.sh │ ├── sh92.PSS_v5_dt_profiling_sift1m_for_bdw.sh │ ├── sh93.NSG_omp_deep10m_for_bdw.sh │ ├── sh94.NSG_omp_sift100m_for_bdw.sh │ ├── sh95.NSG_omp_deep100m_for_bdw.sh │ ├── sh96.PSS_v5_percentile_sift100m.sh │ ├── sh97.PSS_v5_percentile_deep100m.sh │ ├── sh98.NSG_seq_percentile_sift100m.sh │ ├── sh99.NSG_seq_percentile_deep100m.sh │ └── test.py ├── load.sh ├── module_run.py ├── output_column_to_row.py ├── output_element_distance.py ├── output_find_runtime_above_presicion.py ├── output_format.py ├── output_histogram.py ├── output_local_queues_ends.py ├── output_maximum.py ├── output_minimum.py ├── output_row_minimum.py ├── output_rows_to_table.py ├── output_selected_combine.sh ├── output_surrounding.py ├── sciclone │ ├── load.PSS_DEEP100M_T1.sh │ ├── load.PSS_DEEP100M_T2.sh │ ├── load.PSS_DEEP100M_T4.sh │ ├── load.PSS_DEEP100M_T8.sh │ ├── load.SGS_DEEP100M.sh │ ├── load.test.PSS_sift1M_T8.no_affinity.sh │ ├── load.test.PSS_sift1M_T8.set_affinity.sh │ ├── load1.SGS_SIFT100M.sh │ ├── load2.PSS_SIFT100M_T8.sh │ ├── load3.PSS_SIFT100M_T4.sh │ ├── load4.PSS_SIFT100M_T2.sh │ ├── load5.PSS_SIFT100M_T1.sh │ ├── test43.simple_v3_ranged_L.py │ ├── test46.find_L_simple_search_large_graph.py │ ├── test47.simple_v3_large_graph_ranged_L.py │ ├── test48.find_L_simple_search.py │ ├── test49.find_L_SV3_T1_large_graph.py │ ├── test50.find_L_SV3_T1.py │ ├── test51.simple_v3_large_graph_ranged_L.set_affinity.py │ └── test52.simple_v3_large_graph_ranged_L.no_affinity.py ├── select_values.py ├── skylake │ ├── deprecated │ │ ├── sh1.SGS_deep100M_find_L.sh │ │ ├── sh10.gist1m_re-do_PSS.sh │ │ ├── sh2.PSS_deep100M_T1_find_L.sh │ │ ├── sh3.PSS_deep100M_T8.sh │ │ ├── sh4.PSS_deep100M_T4.sh │ │ ├── sh5.PSS_deep100M_T2.sh │ │ ├── sh6.sift1m_re-do_PSS.sh │ │ ├── sh7.deep10m_re-do_PSS.sh │ │ ├── sh8.sift100m_re-do_PSS.sh │ │ ├── sh9.deep100m_re-do_PSS.sh │ │ ├── test46.0.90-0.98.find_L_simple_search_large_graph.py │ │ ├── test46.0.990-0.993.find_L_simple_search_large_graph.py │ │ ├── test46.0.994-0.996.find_L_simple_search_large_graph.py │ │ ├── test46.0.997.find_L_simple_search_large_graph.py │ │ ├── test46.0.998.find_L_simple_search_large_graph.py │ │ ├── test46.0.999.find_L_simple_search_large_graph.py │ │ ├── test46.find_L_simple_search_large_graph.py │ │ └── test47.simple_v3_large_graph_ranged_L.py │ ├── sh.sh │ ├── sh0.NSG.sh │ ├── sh0.PSS_baseline_perf.sh │ ├── sh0.PSS_candidate_step_distance.sh │ ├── sh0.PSS_reorder_perf.sh │ ├── sh0.PSS_sequence_traverse.sh │ ├── sh0.PSS_sequence_traverse_B.sh │ ├── sh0.vtune_PSS_v4_profiling_gist1m.sh │ ├── sh1.vtune_PSS_v4_profiling_sift1m.sh │ ├── sh11.top_m_sift1m.sh │ ├── sh12.top_m_gist1m.sh │ ├── sh129.PSS_v5_find_L_no_staged_deep100m.sh │ ├── sh13.top_m_deep10m.sh │ ├── sh130.NSG_omp_sift1m_profile_sync_overhead.sh │ ├── sh131.NSG_omp_deep100m_profile_sync_overhead.sh │ ├── sh132.insert_NSG_omp_sift1m_profile_sync_overhead.sh │ ├── sh133.insert_NSG_omp_deep100m_profile_sync_overhead.sh │ ├── sh14.top_m_sift100m.sh │ ├── sh15.top_m_deep100m.sh │ ├── sh16.scale_m_sift1m.sh │ ├── sh17.scale_m_gist1m.sh │ ├── sh18.scale_m_deep10m.sh │ ├── sh19.scale_m_sift100m.sh │ ├── sh2.PSS_v4_profiling_deep10m.sh │ ├── sh20.scale_m_deep100m.sh │ ├── sh26.gist1m_re-do_PSS.sh │ ├── sh27.deep10m_re-do_PSS.sh │ ├── sh28.sift100m_re-do_PSS.sh │ ├── sh29.deep100m_re-do_PSS.sh │ ├── sh30.sift1m_re-do_PSS.sh │ ├── sh31.backtracking_SGS_sift1m.sh │ ├── sh32.backtracking_top_m_sift1m.sh │ ├── sh34.PSS_Scale_M_sift1m.sh │ ├── sh35.PSS_Scale_M_gist1m.sh │ ├── sh36.PSS_Scale_M_deep10m.sh │ ├── sh37.PSS_Scale_M_sift100m.sh │ ├── sh38.PSS_Scale_M_deep100m.sh │ ├── sh39.PSS_v4_profiling_sift1m.sh │ ├── sh40.PSS_v4_profiling_gist1m.sh │ ├── sh41.PSS_v4_profiling_deep10m.sh │ ├── sh42.PSS_v4_profiling_sift100m.sh │ ├── sh43.PSS_v4_profiling_deep100m.sh │ ├── sh44.top_m_profiling_sift1m.sh │ ├── sh45.top_m_profiling_gist1m.sh │ ├── sh46.top_m_profiling_deep10m.sh │ ├── sh47.top_m_profiling_sift100m.sh │ ├── sh48.top_m_profiling_deep100m.sh │ ├── sh49.scale_m_profiling_sift1m.sh │ ├── sh50.scale_m_profiling_gist1m.sh │ ├── sh51.scale_m_profiling_deep10m.sh │ ├── sh52.scale_m_profiling_sift100m.sh │ ├── sh53.scale_m_profiling_deep100m.sh │ ├── sh54.NSG_omp_sift1m.sh │ ├── sh55.NSG_omp_gist1m.sh │ ├── sh56.NSG_omp_deep10m.sh │ ├── sh57.NSG_omp_sift100m.sh │ ├── sh58.NSG_omp_deep100m.sh │ ├── sh59.hnsw_sift1m.sh │ ├── sh60.hnsw_gist1m.sh │ ├── sh61.hnsw_deep10m.sh │ ├── sh62.hnsw_sift100m.sh │ ├── sh63.hnsw_deep100m.sh │ ├── sh64.PSS_v5_profiling_sift1m.sh │ ├── sh65.PSS_v5_profiling_gist1m.sh │ ├── sh66.PSS_v5_profiling_deep10m.sh │ ├── sh67.PSS_v5_profiling_sift100m.sh │ ├── sh68.PSS_v5_profiling_deep100m.sh │ ├── sh69.PSS_v5_dt_profiling_sift1m.sh │ ├── sh70.PSS_v5_dt_profiling_gist1m.sh │ ├── sh71.PSS_v5_dt_profiling_deep10m.sh │ ├── sh72.PSS_v5_dt_profiling_sift100m.sh │ ├── sh73.PSS_v5_dt_profiling_deep100m.sh │ ├── sh74.NSG_seq_deep1m.sh │ ├── sh75.hnsw_deep1m.sh │ ├── sh76.PSS_v5_dt_profiling_deep1m.sh │ ├── sh77.PSS_v5_dt_profiling_T16_deep10m_degree.sh │ ├── sh78.PSS_v5_dt_profiling_T1_deep10m_degree.sh │ ├── sh79.PSS_v5_dt_profiling_T16_sift1m_degree.sh │ ├── sh80.PSS_v5_count_reorder_deep100m.sh │ ├── sh81.PSS_v5_count_reorder_sift100m.sh │ ├── sh82.PSS_v5_count_reorder_sift1m.sh │ ├── sh83.PSS_v5_degree_reorder_sift1m.sh │ ├── sh84.PSS_v5_degree_reorder_sift100m.sh │ ├── sh85.PSS_v5_degree_reorder_deep100m.sh │ ├── sh86.PSS_v5_degree_reorder_deep10m.sh │ ├── sh87.PSS_v5_perf_sift1m.sh │ ├── sh88.PSS_v5_reorder_perf_sift1m.sh │ ├── sh89.PSS_v5_perf_sift100m.sh │ ├── sh90.PSS_v5_reorder_perf_sift100m.sh │ ├── sh91.PSS_v5_reorder_threshold_sift100m.sh │ ├── sh92.faiss_gpu.sh │ ├── sh93.PSS_v5_core_subgraph.sh │ └── sh94.plot_graph.sh ├── test43.simple_v3_ranged_L.py ├── test44.PSS_v4_profiling_ranged_L.py ├── test45.hnsw_find_ef.low_ef.py ├── test45.hnsw_find_ef.py ├── test46.find_L_PSS_v4_profile_T1.py ├── test47.PSS_v5_profiling_ranged_L.py ├── test48.find_L_simple_search.py ├── test49.find_L_PSS_v5_profile.py ├── test50.find_L_SV3_T1.py ├── test51.PSS_v5_dt_profiling_ranged_L.py ├── test63.find_L_top_m_scale_m.py ├── test64.find_L_NSG_omp.py ├── test65.find_L_PSS_v4_profile_T1_degree.py ├── test66.PSS_v5_dt_profiling_ranged_L_degree.py ├── test67.PSS_v5_count_reorder_ranged_L.py ├── test68.PSS_v5_sequence_traverse_ranged_L.py ├── test69.PSS_v5_sequence_traverse_B_ranged_L.py ├── test70.app_para_searching.py ├── test71.A.PSS_v5_dt_profiling_ranged_L.py ├── test72.B.PSS_v5_dt_profiling_ranged_L.py ├── test73.PSS_v5_K_values_ranged_L.py ├── test74.PSS_v5_find_L_every_step_merge.py ├── test75.PSS_v5_find_L_every_step_merge_L_master.py ├── test76.PSS_v5_find_L_index_adaptive_merge.py ├── test77.PSS_v5_find_L_index_adaptive_merge_L_master.py ├── test78.PSS_v5_work_std_deviation_ranged_L.py ├── test79.PSS_v5_find_L_every_step_merge_fixed_local_L.py └── test80.PSS_v5_multi_queries_tuning_intra_ranged_L.py ├── tools ├── bfs_test_nsg.cpp ├── check_true_nn.cpp ├── convert_bvecs_to_fvecs.cpp ├── get_mini_cut.py ├── get_mini_cut_duplicate_vertex.py ├── plot_all_monotonic_subfig.py ├── plot_connected_to_nn_all_monotonic_subfig.py ├── plot_graph.py ├── plot_in_6_steps_connected_to_nn_all_monotonic_subfig.py ├── plot_mini_cut_and_connected_to_nn_all_monotonic_subfig.py ├── plot_parallel_search_path_in_subgraph.py ├── plot_parallel_search_path_in_subgraph_core_only.py ├── plot_parallel_search_path_in_subgraph_w_nonmono.py ├── plot_shortest_path_subfig.py ├── save_true_nearest_neighbors.bak.cpp ├── save_true_nearest_neighbors.cpp ├── test.true_NN.cpp ├── test_compare_groundtruth_and_true_nn.cpp ├── test_nsg_index.cpp ├── test_nsg_index_findroot.cpp ├── test_nsg_index_for_bvecs.cpp ├── test_nsg_optimized_search.bak.cpp ├── test_nsg_optimized_search.cpp ├── test_nsg_optimized_search_para.cpp ├── test_nsg_search.cpp ├── widget_get_deep200M.cpp ├── widget_get_fake_reorder_map.cpp ├── widget_get_sift100M.cpp ├── widget_neighbors_distance_distribution.cpp └── widget_transpose.cpp └── vtune ├── Makefile └── skylake.sh.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Build 2 | cmake-build-*/ 3 | cmake-build-debug-remote/ 4 | .idea/ 5 | venv/ 6 | 7 | # MacOS 8 | .DS_Store 9 | 10 | # CLion 11 | .clion.source.upload.marker 12 | 13 | # Prerequisites 14 | *.d 15 | 16 | # Compiled Object files 17 | *.slo 18 | *.lo 19 | *.o 20 | *.obj 21 | 22 | # Precompiled Headers 23 | *.gch 24 | *.pch 25 | 26 | # Compiled Dynamic libraries 27 | *.so 28 | *.dylib 29 | *.dll 30 | 31 | # Fortran module files 32 | *.mod 33 | *.smod 34 | 35 | # Compiled Static libraries 36 | *.lai 37 | *.la 38 | *.a 39 | *.lib 40 | 41 | # Executables 42 | *.exe 43 | *.out 44 | *.app 45 | -------------------------------------------------------------------------------- /gpu_faiss/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.9) 2 | project(faiss_test LANGUAGES CXX CUDA) 3 | 4 | # Verbose Makefile 5 | set(CMAKE_VERBOSE_MAKEFILE ON) 6 | 7 | # C++ version 8 | set(CMAKE_CXX_STANDARD 14) 9 | 10 | # MKL 11 | #find_package(BLAS) 12 | 13 | add_executable(1-Flat 1-Flat.cc) 14 | # target_link_libraries(1-Flat PRIVATE faiss_avx2 ${BLAS_LIBRARIES}) 15 | # target_link_libraries(1-Flat PRIVATE faiss) 16 | #target_link_directories(1-Flat PRIVATE /usr/local/lib) 17 | #target_link_directories(1-Flat PRIVATE /scratch/zpeng/local/openblas/lib) 18 | target_link_directories(1-Flat PRIVATE /scratch/zpeng/local/miniconda3/envs/faiss/lib) 19 | target_link_libraries(1-Flat PRIVATE faiss_avx2) 20 | 21 | # find_package(MKL REQUIRED) 22 | add_executable(4-GPU 4-GPU.cu) 23 | target_link_directories(4-GPU PRIVATE /scratch/zpeng/local/miniconda3/envs/faiss/lib) 24 | target_link_libraries(4-GPU PRIVATE faiss) 25 | 26 | -------------------------------------------------------------------------------- /include/Buckets.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Zhen Peng on 2/25/20. 3 | // 4 | 5 | #ifndef PANNS_BUCKETS_H 6 | #define PANNS_BUCKETS_H 7 | 8 | #include 9 | #include "Candidate.h" 10 | #include "definitions.h" 11 | 12 | namespace PANNS { 13 | 14 | class CandidatesBuckets { 15 | private: 16 | std::vector< std::vector > buckets_; 17 | public: 18 | idi num_buckets_; 19 | distf buckets_lower_; 20 | distf buckets_upper_; 21 | distf overall_width_; 22 | distf bucket_width_; 23 | 24 | CandidatesBuckets() = default; 25 | CandidatesBuckets(idi num_buckets, 26 | distf buckets_lower, 27 | distf buckets_upper) : 28 | num_buckets_(num_buckets), 29 | buckets_lower_(buckets_lower), 30 | buckets_upper_(buckets_upper) 31 | { 32 | overall_width_ = buckets_upper_ - buckets_lower_; 33 | bucket_width_ = overall_width_ / num_buckets_; 34 | buckets_.resize(num_buckets_); 35 | } 36 | 37 | void set_up( 38 | idi num_buckets, 39 | distf buckets_lower, 40 | distf buckets_upper) 41 | { 42 | num_buckets_ = num_buckets; 43 | buckets_lower_ = buckets_lower; 44 | buckets_upper_ = buckets_upper; 45 | overall_width_ = buckets_upper_ - buckets_lower_; 46 | bucket_width_ = overall_width_ / num_buckets_; 47 | buckets_.resize(num_buckets_); 48 | } 49 | 50 | void push_in(const Candidate &cand) 51 | { 52 | idi b_i = (cand.distance_ - buckets_lower_) / bucket_width_; 53 | buckets_[b_i].push_back(cand); 54 | } 55 | }; 56 | 57 | } 58 | 59 | #endif //PANNS_BUCKETS_H 60 | -------------------------------------------------------------------------------- /include/Candidate.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Zhen Peng on 11/15/19. 3 | // 4 | 5 | #ifndef BATCH_SEARCHING_CANDIDATE_H 6 | #define BATCH_SEARCHING_CANDIDATE_H 7 | 8 | 9 | namespace PANNS { 10 | 11 | struct Candidate { 12 | idi id_; 13 | distf distance_; 14 | bool is_checked_; 15 | 16 | Candidate() = default; 17 | Candidate(idi id, distf dist, bool is_checked) : id_(id), distance_(dist), is_checked_(is_checked) 18 | {} 19 | bool operator<(const Candidate &b) const 20 | { 21 | // return this->distance_ < b.distance_; 22 | if (this->distance_ != b.distance_) { 23 | return this->distance_ < b.distance_; 24 | } else { 25 | return this->id_ < b.id_; 26 | } 27 | } 28 | }; 29 | 30 | } // namespace PANNS 31 | 32 | #endif //BATCH_SEARCHING_CANDIDATE_H 33 | -------------------------------------------------------------------------------- /include/Neighbor.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Zhen Peng on 7/12/20. 3 | // 4 | 5 | #ifndef PANNS_NEIGHBOR_H 6 | #define PANNS_NEIGHBOR_H 7 | 8 | namespace PANNS { 9 | 10 | struct Neighbor { 11 | idi id_; 12 | distf distance_; 13 | 14 | Neighbor() = default; 15 | 16 | Neighbor( 17 | idi id, 18 | distf dist) : id_(id), distance_(dist) 19 | { 20 | ; 21 | } 22 | 23 | bool operator<(const Neighbor &b) const 24 | { 25 | if (this->distance_ != b.distance_) { 26 | return this->distance_ < b.distance_; 27 | } else { 28 | return this->id_ < b.id_; 29 | } 30 | } 31 | }; 32 | 33 | } // namespace PANNS 34 | #endif //PANNS_NEIGHBOR_H 35 | -------------------------------------------------------------------------------- /include/PCM/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fedora:35 as builder 2 | 3 | RUN dnf -y install gcc-c++ git findutils make cmake 4 | COPY . /tmp/pcm 5 | RUN cd /tmp/pcm && mkdir build && cd build && cmake .. && make 6 | 7 | FROM fedora:35 8 | COPY --from=builder /tmp/pcm/build/bin/* /usr/local/bin/ 9 | ENV PCM_NO_PERF=1 10 | 11 | ENTRYPOINT [ "/usr/local/bin/pcm-sensor-server", "-p", "9738", "-r" ] 12 | -------------------------------------------------------------------------------- /include/PCM/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2016-2020, opcm 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /include/PCM/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | image: 3 | - Visual Studio 2019 4 | - Visual Studio 2017 5 | configuration: Release 6 | platform: x64 7 | before_build: 8 | - cmd: >- 9 | cmake --version 10 | 11 | cmake -B build 12 | 13 | 14 | build_script: 15 | - cmake --build build --config Release --parallel 16 | 17 | after_build: 18 | - cmd: 7z a pcm-all.zip %APPVEYOR_BUILD_FOLDER%\build\bin\Release\*.exe %APPVEYOR_BUILD_FOLDER%\build\bin\Release\*.dll %APPVEYOR_BUILD_FOLDER%\build\src\Release\*.lib %APPVEYOR_BUILD_FOLDER%\build\src\Release\*.exp 19 | artifacts: 20 | - path: pcm-all.zip 21 | name: pcm-all -------------------------------------------------------------------------------- /include/PCM/doc/CUSTOM-COMPILE-OPTIONS.md: -------------------------------------------------------------------------------- 1 | cpucounters.h : `#define PCM_HA_REQUESTS_READS_ONLY` 2 | For the metric "LOCAL: number of local memory access in %“ (getLocalMemoryRequestRatio API) count only read accesses (local and all). 3 | 4 | cpucounters.h : `#define PCM_DEBUG_TOPOLOGY` 5 | print detailed CPU topology information 6 | 7 | cpucounters.h : `#define PCM_UNCORE_PMON_BOX_CHECK_STATUS` 8 | verify uncore PMU register state after programming 9 | 10 | types.h : `#define PCM_DEBUG` 11 | print some debug information 12 | 13 | pci.h : `#define PCM_USE_PCI_MM_LINUX` 14 | use /dev/mem (direct memory mapped I/O) for PCICFG register access on Linux. This might be required for accessing registers in extended configuration space (beyond 4K) in *pcm-pcicfg* utility. Recent Linux kernels also require to be booted with iomem=relaxed option to make this work. 15 | 16 | -------------------------------------------------------------------------------- /include/PCM/doc/DOCKER_README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- 2 | How To Run Processor Counter Monitor Server Container from GitHub Container Repository or Docker Hub 3 | -------------------------------------------------------------------------------- 4 | 5 | As root user: 6 | 1. ``modprobe msr`` 7 | 2. ``docker run -d --name pcm --privileged -p 9738:9738 ghcr.io/opcm/pcm`` (GitHub Container repository) or ``docker run -d --name pcm --privileged -p 9738:9738 opcm/pcm`` (Dockerhub repository) 8 | - the container can also be run with limited capabilities without the privileged mode: ``docker run -d --name pcm --cap-add=SYS_ADMIN --cap-add=SYS_RAWIO --device=/dev/cpu --device=/dev/mem -v /sys/firmware/acpi/tables/MCFG:/pcm/sys/firmware/acpi/tables/MCFG:ro -v /proc/bus/pci/:/pcm/proc/bus/pci/ -v /proc/sys/kernel/nmi_watchdog:/pcm/proc/sys/kernel/nmi_watchdog -p 9738:9738 ghcr.io/opcm/pcm`` (there is also a docker-compose file containing these options: https://raw.githubusercontent.com/opcm/pcm/master/docker-compose.yml) 9 | 10 | This will start pcm-sensor-server container exposing CPU metrics from the whole system at port 9738 11 | 12 | The URLs of the docker container repositories: 13 | - https://github.com/opcm/pcm/pkgs/container/pcm 14 | - https://hub.docker.com/r/opcm/pcm 15 | -------------------------------------------------------------------------------- /include/PCM/doc/ENVVAR_README.md: -------------------------------------------------------------------------------- 1 | `PCM_NO_PERF=1` : don't use Linux perf events API to program *core* PMUs (default is to use it) 2 | 3 | `PCM_USE_UNCORE_PERF=1` : use Linux perf events API to program *uncore* PMUs (default is *not* to use it) 4 | 5 | `PCM_NO_RDT=1` : don't use RDT metrics for a better interoperation with pqos utility (https://github.com/intel/intel-cmt-cat) 6 | 7 | `PCM_USE_RESCTRL=1` : use Linux resctrl driver for RDT metrics 8 | 9 | `PCM_PRINT_TOPOLOGY=1` : print detailed CPU topology 10 | 11 | `PCM_KEEP_NMI_WATCHDOG=1` : don't disable NMI watchdog (reducing the core metrics set) 12 | -------------------------------------------------------------------------------- /include/PCM/doc/FREEBSD_HOWTO.txt: -------------------------------------------------------------------------------- 1 | Building: 2 | $ cmake -B build 3 | $ cmake --build build 4 | 5 | Runtime requirements: 6 | * the cpuctl(4) driver needs to be loaded 7 | 8 | PCM is also available as a port maintained by The FreeBSD Project (sysutils/intel-pcm). 9 | -------------------------------------------------------------------------------- /include/PCM/doc/KSysGuard HOWTO.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnpzh/parallel_ANNS/2116d7bf9207fc62c9a11b1919212506cc5a6447/include/PCM/doc/KSysGuard HOWTO.docx -------------------------------------------------------------------------------- /include/PCM/doc/KSysGuard HOWTO.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnpzh/parallel_ANNS/2116d7bf9207fc62c9a11b1919212506cc5a6447/include/PCM/doc/KSysGuard HOWTO.pdf -------------------------------------------------------------------------------- /include/PCM/doc/LINUX_HOWTO.txt: -------------------------------------------------------------------------------- 1 | Refer to the main README ("Building PCM Tools" or "Downloading Pre-Compiled PCM Tools") sections 2 | -------------------------------------------------------------------------------- /include/PCM/doc/PCM-EXPORTER.md: -------------------------------------------------------------------------------- 1 | # Processor Counter Monitor (PCM) Prometheus exporter [![Build Status](https://travis-ci.com/opcm/pcm.svg?branch=master)](https://travis-ci.com/opcm/pcm) [![pulls](https://img.shields.io/docker/pulls/opcm/pcm.svg)](DOCKER_README.md) 2 | 3 | 4 | pcm-sensor-server is a collector exposing Intel processor metrics over http in JSON or Prometheus (exporter text based) format. Also [available as a docker container](DOCKER_README.md). 5 | 6 | Installation on target system to be analyzed: 7 | 1. [Build](https://github.com/opcm/pcm#building-pcm-tools) or [download](https://github.com/opcm/pcm#downloading-pre-compiled-pcm-tools) pcm tools 8 | 2. As root, start pcm-sensor-server: `sudo ./pcm-sensor-server` 9 | 10 | Alternatively one can start [pcm-sensor-server as a container from docker hub](DOCKER_README.md). 11 | 12 | Additional options: 13 | 14 | ``` 15 | $ ./pcm-sensor-server --help 16 | Usage: ./pcm-sensor-server [OPTION] 17 | 18 | Valid Options: 19 | -d : Run in the background 20 | -p portnumber : Run on port (default port is 9738) 21 | -r|--reset : Reset programming of the performance counters. 22 | -D|--debug level : level = 0: no debug info, > 0 increase verbosity. 23 | -R|--real-time : If possible the daemon will run with real time 24 | priority, could be useful under heavy load to 25 | stabilize the async counter fetching. 26 | -h|--help : This information 27 | ``` 28 | 29 | The PCM exporter can be used together with Grafana to obtain these Intel processor metrics (see [how-to](../scripts/grafana/README.md)): 30 | 31 | ![pcm grafana output](https://raw.githubusercontent.com/wiki/opcm/pcm/pcm-dashboard-full.png) 32 | -------------------------------------------------------------------------------- /include/PCM/doc/license.txt: -------------------------------------------------------------------------------- 1 | This notice belongs to the code originating from "Intel Performance Counter Monitor". 2 | 3 | Copyright (c) 2009-2016, Intel Corporation 4 | All rights reserved. 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of Intel Corporation nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /include/PCM/doc/run-as-administrator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnpzh/parallel_ANNS/2116d7bf9207fc62c9a11b1919212506cc5a6447/include/PCM/doc/run-as-administrator.png -------------------------------------------------------------------------------- /include/PCM/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.0' 2 | services: 3 | pcm: 4 | image: opcm/pcm 5 | ports: 6 | - "9738:9738" 7 | volumes: 8 | - "/sys/firmware/acpi/tables/MCFG:/pcm/sys/firmware/acpi/tables/MCFG:ro" 9 | - "/proc/bus/pci/:/pcm/proc/bus/pci/" 10 | - "/proc/sys/kernel/nmi_watchdog:/pcm/proc/sys/kernel/nmi_watchdog" 11 | cap_add: 12 | - SYS_ADMIN 13 | - SYS_RAWIO 14 | devices: 15 | - /dev/cpu 16 | - /dev/mem 17 | -------------------------------------------------------------------------------- /include/PCM/scripts/convert_edp_list.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | cat "$1" | sed '0,/^#.*[gG][rR][oO][uU][pP]/d' | head -n -1 | dos2unix 4 | 5 | -------------------------------------------------------------------------------- /include/PCM/scripts/cppcheck.sh: -------------------------------------------------------------------------------- 1 | 2 | cppcheck $1 --force --enable=warning --inline-suppr -iPCMService.cpp -isimdjson -iPcmMsrDriver_info.c -j $2 2> cppcheck.out 3 | 4 | if [ -s cppcheck.out ] 5 | then 6 | cat cppcheck.out 7 | exit 1 8 | fi 9 | 10 | echo No issues found 11 | 12 | -------------------------------------------------------------------------------- /include/PCM/scripts/find_field.awk: -------------------------------------------------------------------------------- 1 | #!/bin/awk -f 2 | 3 | { 4 | for(i=1; i<=NF; i++) { 5 | if (index($i, term) > 0) print (i)":"$i; 6 | } 7 | } -------------------------------------------------------------------------------- /include/PCM/scripts/find_field.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | head -1 $1 | awk -F ',' -v term="$2" -f find_field.awk 4 | 5 | 6 | -------------------------------------------------------------------------------- /include/PCM/scripts/get_sles_bins.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | filename=`curl https://download.opensuse.org/repositories/home:/opcm/SLE_15_SP1/x86_64/ -s | sed -n 's/.*\(pcm-0-[0-9]*\.1\.x86_64.rpm\).*/\1/p'` 4 | 5 | curl -L https://download.opensuse.org/repositories/home:/opcm/SLE_15_SP1/x86_64/$filename -o $filename 6 | 7 | rpm2cpio $filename | cpio -idmv 8 | 9 | -------------------------------------------------------------------------------- /include/PCM/scripts/grafana/automatic_influxdb.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | datasources: 4 | - name: PCM 5 | type: influxdb 6 | access: proxy 7 | url: "http://influxdb:8086" 8 | password: 9 | user: 10 | database: telegraf 11 | basicAuth: false 12 | basicAuthUser: 13 | basicAuthPassword: 14 | withCredentials: 15 | isDefault: true 16 | jsonData: 17 | tlsAuth: false 18 | tlsAuthWithCACert: false 19 | timeInterval: "2s" 20 | secureJsonData: 21 | tlsCACert: "" 22 | tlsClientCert: "" 23 | tlsClientKey: "" 24 | version: 1 25 | editable: true 26 | 27 | 28 | -------------------------------------------------------------------------------- /include/PCM/scripts/grafana/automatic_prometheus.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | datasources: 4 | - name: PCM 5 | type: prometheus 6 | access: proxy 7 | url: "http://prometheus:9090" 8 | password: 9 | user: 10 | database: 11 | basicAuth: false 12 | isDefault: true 13 | editable: true 14 | jsonData: 15 | readOnly: false 16 | version: 1 17 | -------------------------------------------------------------------------------- /include/PCM/scripts/grafana/prometheus.yml.template: -------------------------------------------------------------------------------- 1 | # my global config 2 | global: 3 | scrape_interval: 2s # Set the scrape interval to every 15 seconds. Default is every 1 minute. 4 | evaluation_interval: 2s # Evaluate rules every 15 seconds. The default is every 1 minute. 5 | # scrape_timeout is set to the global default (10s). 6 | 7 | # Alertmanager configuration 8 | alerting: 9 | alertmanagers: 10 | - static_configs: 11 | - targets: 12 | # - alertmanager:9093 13 | 14 | # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. 15 | rule_files: 16 | # - "first_rules.yml" 17 | # - "second_rules.yml" 18 | 19 | # A scrape configuration containing exactly one endpoint to scrape: 20 | # Here it's Prometheus itself. 21 | scrape_configs: 22 | # The job name is added as a label `job=` to any timeseries scraped from this config. 23 | - job_name: 'pcm' 24 | 25 | # metrics_path defaults to '/metrics' 26 | # scheme defaults to 'http'. 27 | 28 | static_configs: 29 | - targets: ['PCMSENSORSERVER'] 30 | -------------------------------------------------------------------------------- /include/PCM/scripts/grafana/provisioning/dashboards/pcm-provider.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | # an unique provider name 5 | - name: 'default PCM dashboard provider' 6 | # org id. will default to orgId 1 if not specified 7 | orgId: 1 8 | # name of the dashboard folder. Required 9 | folder: '' 10 | # folder UID. will be automatically generated if not specified 11 | folderUid: '' 12 | # provider type. Required 13 | type: file 14 | # disable dashboard deletion 15 | disableDeletion: false 16 | # enable dashboard editing 17 | editable: true 18 | # how often Grafana will scan for changed dashboards 19 | updateIntervalSeconds: 10 20 | # allow updating provisioned dashboards from the UI 21 | allowUiUpdates: false 22 | options: 23 | # path to dashboard files on disk. Required 24 | path: /var/lib/grafana/dashboards 25 | -------------------------------------------------------------------------------- /include/PCM/scripts/grafana/start-prometheus.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$#" -ne 1 ]; 4 | then 5 | echo 6 | echo "Usage: $0 target_address:port" 7 | echo 8 | echo "target_address is the hostname or IP address of the system that runs pcm-sensor-server" 9 | exit 1 10 | fi 11 | 12 | sed "s#PCMSENSORSERVER#$1#g" prometheus.yml.template > prometheus.yml 13 | 14 | mkdir -p grafana_volume/dashboards 15 | mkdir -p prometheus_volume 16 | 17 | chmod -R 777 *_volume 18 | 19 | mkdir -p provisioning/datasources 20 | cp automatic_prometheus.yml provisioning/datasources/automatic.yml 21 | 22 | echo Downloading PCM dashboard 23 | curl -o grafana_volume/dashboards/pcm-dashboard.json $1/dashboard/prometheus 24 | 25 | echo Starting prometheus 26 | docker run --name prometheus -d -p 9090:9090 -v $PWD/prometheus.yml:/etc/prometheus/prometheus.yml -v $PWD/prometheus_volume:/prometheus prom/prometheus 27 | echo Starting grafana 28 | docker run -d --link=prometheus --name=grafana -p 3000:3000 -v $PWD/grafana_volume:/var/lib/grafana -v $PWD/provisioning:/etc/grafana/provisioning grafana/grafana 29 | 30 | echo Start browser at http://localhost:3000/ and login with admin user, password admin 31 | 32 | 33 | -------------------------------------------------------------------------------- /include/PCM/scripts/grafana/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$#" -ne 1 ]; 4 | then 5 | echo 6 | echo "Usage: $0 http(s)://target_address:port" 7 | echo 8 | echo "target_address is the hostname or IP address of the system that runs pcm-sensor-server" 9 | exit 1 10 | fi 11 | 12 | sed "s#PCMSENSORSERVER#$1#g" telegraf.conf.template > telegraf.conf 13 | 14 | mkdir -p grafana_volume/dashboards 15 | mkdir -p influxdb_volume 16 | 17 | chmod -R 777 *_volume 18 | 19 | mkdir -p provisioning/datasources 20 | cp automatic_influxdb.yml provisioning/datasources/automatic.yml 21 | 22 | echo Downloading PCM dashboard 23 | curl -o grafana_volume/dashboards/pcm-dashboard.json $1/dashboard 24 | 25 | echo Starting influxdb 26 | docker run -d --name influxdb -p 8083:8083 -p 8086:8086 -v $PWD/influxdb_volume:/var/lib/influxdb influxdb:1.8.0-alpine 27 | echo Starting telegraf 28 | docker run -d --name telegraf --link=influxdb -v $PWD/telegraf.conf:/etc/telegraf/telegraf.conf:ro telegraf 29 | echo Starting grafana 30 | docker run -d --link=influxdb --name=grafana -p 3000:3000 -v $PWD/provisioning:/etc/grafana/provisioning -v $PWD/grafana_volume:/var/lib/grafana grafana/grafana 31 | 32 | echo Start browser at http://localhost:3000/ and login with admin user, password admin 33 | 34 | -------------------------------------------------------------------------------- /include/PCM/scripts/grafana/stop.sh: -------------------------------------------------------------------------------- 1 | 2 | for c in grafana telegraf influxdb prometheus; do 3 | 4 | id=`docker ps -a -q --filter="name=$c" --format="{{.ID}}"` 5 | if [ ! -z "$id" ] 6 | then 7 | echo Stopping and deleting $c 8 | docker rm $(docker stop $id) 9 | fi 10 | done 11 | 12 | -------------------------------------------------------------------------------- /include/PCM/scripts/pcm-background.sh: -------------------------------------------------------------------------------- 1 | 2 | pcm "$@" & 3 | 4 | echo "$!" > pcm.pid 5 | -------------------------------------------------------------------------------- /include/PCM/scripts/pcm-exporter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ../build/bin/pcm-sensor-server "$@" 4 | 5 | -------------------------------------------------------------------------------- /include/PCM/scripts/pcm-stop.sh: -------------------------------------------------------------------------------- 1 | 2 | kill `cat pcm.pid` 3 | -------------------------------------------------------------------------------- /include/PCM/scripts/pcm.plot: -------------------------------------------------------------------------------- 1 | 2 | set key autotitle columnhead 3 | set datafile separator "," 4 | 5 | # change as needed 6 | # set xlabel 'sample # (each is 1000ms)' 7 | 8 | set ylabel 'metric value' 9 | 10 | set terminal pdf 11 | set output "pcm.pdf" 12 | 13 | # change below as needed 14 | # plot metrics 3 .. 37 15 | do for [m=3:37] { 16 | plot "single_header.pcm.csv" using m with dots 17 | } 18 | 19 | # plot metrics 84 .. 107 20 | do for [m=84:107] { 21 | plot "single_header.pcm.csv" using m with dots 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /include/PCM/scripts/readmem.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | numactl --cpunodebind=0 --membind=0 ./readmem 10 & 4 | numactl --cpunodebind=1 --membind=1 ./readmem 10 & 5 | numactl --cpunodebind=0 --membind=0 ./readmem 10 & 6 | numactl --cpunodebind=1 --membind=1 ./readmem 10 & 7 | numactl --cpunodebind=0 --membind=0 ./readmem 10 & 8 | numactl --cpunodebind=1 --membind=1 ./readmem 10 & 9 | numactl --cpunodebind=0 --membind=0 ./readmem 10 & 10 | numactl --cpunodebind=1 --membind=1 ./readmem 10 & 11 | numactl --cpunodebind=0 --membind=0 ./readmem 10 & 12 | numactl --cpunodebind=1 --membind=1 ./readmem 10 & 13 | numactl --cpunodebind=0 --membind=0 ./readmem 10 & 14 | numactl --cpunodebind=1 --membind=1 ./readmem 10 & 15 | 16 | -------------------------------------------------------------------------------- /include/PCM/scripts/single_header.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | line = 0; 3 | } 4 | 5 | { 6 | if (line == 0) 7 | { 8 | # print $0; 9 | for(i=1; i<=NF; i++) { 10 | first[i] = $i; 11 | } 12 | } 13 | else if (line == 1) 14 | { 15 | for(i=1; i<=NF; i++) { 16 | if ($i != "") printf first[i]" "$i"," 17 | } 18 | print "" 19 | } 20 | else 21 | { 22 | print $0 23 | } 24 | 25 | line = line + 1; 26 | } 27 | -------------------------------------------------------------------------------- /include/PCM/scripts/single_header.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | cat $1 | awk -F ',' -f single_header.awk > single_header.$1 4 | 5 | -------------------------------------------------------------------------------- /include/PCM/src/MacMSRDriver/PcmMsr.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /include/PCM/src/MacMSRDriver/PcmMsr.xcodeproj/project.xcworkspace/xcuserdata/aiott.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnpzh/parallel_ANNS/2116d7bf9207fc62c9a11b1919212506cc5a6447/include/PCM/src/MacMSRDriver/PcmMsr.xcodeproj/project.xcworkspace/xcuserdata/aiott.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /include/PCM/src/MacMSRDriver/PcmMsr.xcodeproj/project.xcworkspace/xcuserdata/pjkerly.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnpzh/parallel_ANNS/2116d7bf9207fc62c9a11b1919212506cc5a6447/include/PCM/src/MacMSRDriver/PcmMsr.xcodeproj/project.xcworkspace/xcuserdata/pjkerly.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /include/PCM/src/MacMSRDriver/PcmMsr.xcodeproj/xcuserdata/aiott.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PcmMsr.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | PcmMsrLibrary.xcscheme 13 | 14 | orderHint 15 | 1 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 81ADBF11156EEB93006D9B47 21 | 22 | primary 23 | 24 | 25 | 81DEAF55157008B7005E8EC6 26 | 27 | primary 28 | 29 | 30 | 81F91BBB156D9BF8007DD788 31 | 32 | primary 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /include/PCM/src/MacMSRDriver/PcmMsr.xcodeproj/xcuserdata/pjkerly.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PcmMsrDriver.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | PcmMsrLibrary.xcscheme 13 | 14 | orderHint 15 | 1 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 81ADBF11156EEB93006D9B47 21 | 22 | primary 23 | 24 | 25 | 81F91BBB156D9BF8007DD788 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /include/PCM/src/MacMSRDriver/PcmMsr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | message(STATUS ${IOKIT_LIBRARY}) 2 | 3 | add_executable( 4 | PcmMsrDriver 5 | MACOSX_BUNDLE 6 | PcmMsr.cpp 7 | PcmMsrDriver_info.c 8 | PcmMsr-Info.plist 9 | ) 10 | 11 | set_target_properties(PcmMsrDriver PROPERTIES BUNDLE_EXTENSION kext MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/PcmMsr-Info.plist) 12 | target_include_directories(PcmMsrDriver PRIVATE 13 | ${CMAKE_OSX_SYSROOT}/System/Library/Frameworks/Kernel.framework/PrivateHeaders 14 | ${CMAKE_OSX_SYSROOT}/System/Library/Frameworks/Kernel.framework/Headers 15 | ) 16 | target_compile_definitions(PcmMsrDriver PRIVATE 17 | -DKERNEL 18 | -DKERNEL_PRIVATE 19 | -DDRIVER_PRIVATE 20 | -DAPPLE 21 | -DNeXT 22 | ) 23 | 24 | target_link_libraries(PcmMsrDriver PRIVATE ${IOKIT_LIBRARY} 25 | "-lkmodc++" 26 | "-lkmod" 27 | "-lcc_kext" 28 | "-nostdlib" 29 | "-Xlinker -object_path_lto" 30 | "-Xlinker -export_dynamic" 31 | "-Xlinker -kext" 32 | ) 33 | 34 | # PcmMsrDriver.kext is built here and located in 'build/bin' 35 | set(LIB_EXT_PATH "/Library/Extensions") 36 | install(TARGETS PcmMsrDriver DESTINATION "${LIB_EXT_PATH}/") 37 | install(CODE "execute_process(COMMAND kextload ${LIB_EXT_PATH}/PcmMsrDriver.kext)") 38 | -------------------------------------------------------------------------------- /include/PCM/src/MacMSRDriver/PcmMsr/PcmMsrDriver_info.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern kern_return_t _start(kmod_info_t *ki, void *data); 4 | extern kern_return_t _stop(kmod_info_t *ki, void *data); 5 | 6 | __attribute__((visibility("default"))) KMOD_EXPLICIT_DECL(com.intel.driver.PcmMsrDriver, "1.0.0d1", _start, _stop) 7 | __private_extern__ kmod_start_func_t *_realmain = 0; 8 | __private_extern__ kmod_stop_func_t *_antimain = 0; 9 | __private_extern__ int _kext_apple_cc = __APPLE_CC__ ; 10 | -------------------------------------------------------------------------------- /include/PCM/src/MacMSRDriver/PcmMsr/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /include/PCM/src/MacMSRDriver/kextload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cp -R ../../build/bin/PcmMsrDriver.kext /Library/Extensions/. 4 | chown -R root:wheel /Library/Extensions/PcmMsrDriver.kext 5 | kextload /Library/Extensions/PcmMsrDriver.kext 6 | -------------------------------------------------------------------------------- /include/PCM/src/MacMSRDriver/kextunload.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | kextunload /Library/Extensions/PcmMsrDriver.kext 4 | rm -rf /Library/Extensions/PcmMsrDriver.kext 5 | -------------------------------------------------------------------------------- /include/PCM/src/WinMSRDriver/makefile: -------------------------------------------------------------------------------- 1 | !INCLUDE $(NTMAKEENV)\makefile.def -------------------------------------------------------------------------------- /include/PCM/src/WinMSRDriver/msr.h: -------------------------------------------------------------------------------- 1 | #ifndef MSR_INCLUDED 2 | #define MSR_INCLUDED 3 | 4 | /* 5 | Copyright (c) 2009-2012, Intel Corporation 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 11 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 12 | * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15 | */ 16 | /* 17 | written by Roman Dementiev 18 | */ 19 | 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include "msrstruct.h" 26 | 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/PCM/src/WinMSRDriver/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=msr 2 | TARGETTYPE=DRIVER 3 | NTDDI_VERSION=NTDDI_WIN7 4 | 5 | MSC_WARNING_LEVEL=/W3 /WX 6 | 7 | 8 | INCLUDES=\ 9 | $(DDK_INC_PATH); 10 | 11 | TARGETLIBS=\ 12 | $(DDK_LIB_PATH)\ntoskrnl.lib 13 | 14 | 15 | SOURCES=msrmain.c 16 | 17 | PRECOMPILED_INCLUDE=msr.h 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /include/PCM/src/daemon/.gitignore: -------------------------------------------------------------------------------- 1 | .project 2 | client/.project 3 | client/.cproject 4 | client/Debug/client 5 | daemon/.project 6 | daemon/.cproject 7 | daemon/Debug/daemon 8 | daemon/test/test -------------------------------------------------------------------------------- /include/PCM/src/daemon/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2017, Intel Corporation 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | */ 13 | // written by Steven Briscoe 14 | 15 | #include "daemon.h" 16 | 17 | int main(int argc, char *argv[]) 18 | { 19 | PCMDaemon::Daemon daemon(argc, argv); 20 | 21 | return daemon.run(); 22 | } 23 | -------------------------------------------------------------------------------- /include/PCM/src/dashboard.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | Copyright (c) 2020, Intel Corporation 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 10 | * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13 | */ 14 | #include 15 | 16 | namespace pcm { 17 | 18 | enum PCMDashboardType { InfluxDB, Prometheus, Prometheus_Default }; 19 | 20 | std::string getPCMDashboardJSON(const PCMDashboardType type, int ns = -1, int nu = -1, int nc = -1); 21 | 22 | } // namespace pcm 23 | -------------------------------------------------------------------------------- /include/PCM/src/dashboardtest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2020, Intel Corporation 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | */ 13 | 14 | #include "dashboard.h" 15 | #include 16 | 17 | int main() 18 | { 19 | std::cout << pcm::getPCMDashboardJSON(pcm::Prometheus, 2, 3, 10) << std::endl; 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /include/PCM/src/debug.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BSD 3-Clause License 3 | 4 | Copyright (c) 2020, Intel Corporation 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | * Neither the name of the copyright holder nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | namespace pcm { 34 | 35 | namespace debug { 36 | int currentDebugLevel = 0; 37 | 38 | void dyn_debug_level( int debugLevel ) { 39 | debug::currentDebugLevel = debugLevel; 40 | } 41 | } 42 | 43 | } // namespace pcm -------------------------------------------------------------------------------- /include/PCM/src/exceptions/unsupported_processor_exception.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2017, Intel Corporation 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | */ 13 | // written by Steven Briscoe 14 | 15 | #include 16 | 17 | class UnsupportedProcessorException: public std::exception 18 | { 19 | virtual const char* what() const throw() 20 | { 21 | return "Unsupported processor"; 22 | } 23 | }; -------------------------------------------------------------------------------- /include/PCM/src/freegetopt/ChangeLog: -------------------------------------------------------------------------------- 1 | 2003-10-25 Mark K. Kim {getopt*cbreak.org} 2 | 3 | * *: freegetopt 0.11 released. 4 | 5 | 2003-10-25 Mark K. Kim {getopt*cbreak.org} 6 | 7 | * ChangeLog: ChangeLog file added. 8 | 9 | * LICENSE: License file added. License is now officially BSD. 10 | 11 | * README: Updated to reflect the new license. CVS tracking data 12 | added. 13 | 14 | * getopt.h, getopt.c: License text added to the beginning of 15 | each file. CVS tracking data added. 16 | 17 | * test.c: License text added to the beginning of the file. 18 | CVS tracking data added. 19 | 20 | 2003-10-20 Mark K. Kim {getopt*cbreak.org} 21 | 22 | * *: Sourceforge project approval. Name changed to freegetopt. 23 | License is now officially BSD. 24 | 25 | 2003-09-29 Jon Higdon {jhigdon*nni.com} 26 | 27 | * test.c: GCC 3.x gives compound statement warning. Fixed. 28 | 29 | 2003.01.12 Mark K. Kim {getopt*cbreak.org} 30 | 31 | * *: Getopt 1.0 released! Supports only short options, but 32 | I think it's fully compatible with GNU getopt except for the 33 | value of optind while getopt is still running. The value 34 | of optind is same after getopt finishes running, however. 35 | 36 | -------------------------------------------------------------------------------- /include/PCM/src/freegetopt/LICENSE: -------------------------------------------------------------------------------- 1 | Free Getopt 2 | Copyright (c)2002-2003 Mark K. Kim 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in 14 | the documentation and/or other materials provided with the 15 | distribution. 16 | 17 | * Neither the original author of this software nor the names of its 18 | contributors may be used to endorse or promote products derived 19 | from this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 28 | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 29 | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 30 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 31 | THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 32 | DAMAGE. 33 | 34 | -------------------------------------------------------------------------------- /include/PCM/src/mutex.h: -------------------------------------------------------------------------------- 1 | #ifndef MUTEX_HEADER_ 2 | #define MUTEX_HEADER_ 3 | 4 | #ifdef _MSC_VER 5 | #include 6 | #else 7 | #include 8 | #endif 9 | 10 | #include 11 | 12 | namespace pcm 13 | { 14 | class Mutex { 15 | #ifdef _MSC_VER 16 | HANDLE mutex_; 17 | #else 18 | pthread_mutex_t mutex_; 19 | #endif 20 | 21 | public: 22 | Mutex() 23 | { 24 | #ifdef _MSC_VER 25 | mutex_ = CreateMutex(NULL, FALSE, NULL); 26 | #else 27 | pthread_mutex_init(&mutex_, NULL); 28 | #endif 29 | } 30 | virtual ~Mutex() 31 | { 32 | #ifdef _MSC_VER 33 | CloseHandle(mutex_); 34 | #else 35 | if (pthread_mutex_destroy(&mutex_) != 0) std::cerr << "pthread_mutex_destroy failed\n"; 36 | #endif 37 | } 38 | 39 | void lock() 40 | { 41 | #ifdef _MSC_VER 42 | WaitForSingleObject(mutex_, INFINITE); 43 | #else 44 | if (pthread_mutex_lock(&mutex_) != 0) std::cerr << "pthread_mutex_lock failed\n";; 45 | #endif 46 | } 47 | void unlock() 48 | { 49 | #ifdef _MSC_VER 50 | ReleaseMutex(mutex_); 51 | #else 52 | if(pthread_mutex_unlock(&mutex_) != 0) std::cerr << "pthread_mutex_unlock failed\n"; 53 | #endif 54 | } 55 | 56 | class Scope { 57 | Mutex & m; 58 | public: 59 | Scope(Mutex & m_) : m(m_) 60 | { 61 | m.lock(); 62 | } 63 | ~Scope() { 64 | m.unlock(); 65 | } 66 | }; 67 | }; 68 | } 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /include/PCM/src/simdjson_wrapper.cpp: -------------------------------------------------------------------------------- 1 | #include "simdjson_wrapper.h" 2 | 3 | #ifdef PCM_SIMDJSON_AVAILABLE 4 | #include "simdjson/singleheader/simdjson.cpp" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/PCM/src/simdjson_wrapper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef __GNUC__ 4 | #if __GNUC__ < 7 5 | #define PCM_GCC_6_OR_BELOW 6 | #endif 7 | #endif 8 | 9 | #ifndef PCM_GCC_6_OR_BELOW 10 | #if defined SYSTEM_SIMDJSON 11 | #include 12 | #define PCM_SIMDJSON_AVAILABLE 13 | #elif defined __has_include 14 | #if __has_include ("simdjson/singleheader/simdjson.h") 15 | #pragma warning(push, 0) 16 | #include "simdjson/singleheader/simdjson.h" 17 | #pragma warning(pop) 18 | #define PCM_SIMDJSON_AVAILABLE 19 | #else 20 | #pragma message("parsing events from 01.org/perfmon won't be supported because simdjson library is not found in simdjson/singleheader/simdjson.h") 21 | #pragma message("run 'git clone https://github.com/simdjson/simdjson.git' in src directory to get simdjson library") 22 | #endif 23 | #else 24 | #pragma message("The compiler is too old, it does not support '__has_include' directive and other c++ features required for simdjson library. Parsing events from 01.org/perfmon won't be supported.") 25 | #endif 26 | #else 27 | #pragma message("The compiler is too old (g++ 6 or below). Parsing events from 01.org/perfmon won't be supported.") 28 | #endif 29 | -------------------------------------------------------------------------------- /include/PCM/src/version.h: -------------------------------------------------------------------------------- 1 | #define PCM_VERSION " (2022-05-14 08:27:57 +0200 ID=cb81e125)" 2 | -------------------------------------------------------------------------------- /include/PCM/src/windows/PCM-Service.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /include/PCM/src/windows/PCMInstaller.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2012, Intel Corporation 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | */ 13 | /* 14 | ** Written by Otto Bruggeman 15 | */ 16 | 17 | 18 | #include "PCMInstaller.h" 19 | -------------------------------------------------------------------------------- /include/PCM/src/windows/PCM_cpp_ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | CONSOLE APPLICATION : pcm Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this pcm application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your pcm application. 9 | 10 | 11 | pcm.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | pcm.cpp 18 | This is the main application source file. 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | Other standard files: 22 | 23 | StdAfx.h, StdAfx.cpp 24 | These files are used to build a precompiled header (PCH) file 25 | named pcm.pch and a precompiled types file named StdAfx.obj. 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | Other notes: 29 | 30 | AppWizard uses "TODO:" comments to indicate parts of the source code you 31 | should add to or customize. 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | -------------------------------------------------------------------------------- /include/PCM/src/windows/ReadMe_PCMService.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | APPLICATION : PMU Service Project Overview 3 | ======================================================================== 4 | 5 | Windows Service Wizard has created this PMU Service Application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your PMU Service application. 9 | 10 | PMU Service.vcproj 11 | This is the main project file for VC++ projects generated using a Windows Service Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations. 14 | 15 | PMU ServiceWinService.cpp 16 | This is the main application source file. 17 | 18 | AssemblyInfo.cpp 19 | Contains custom attributes for modifying assembly metadata. 20 | 21 | 22 | ///////////////////////////////////////////////////////////////////////////// 23 | Other notes: 24 | 25 | Windows Service Wizard uses "TODO:" to indicate parts of the source code you 26 | should add to or customize. 27 | 28 | ///////////////////////////////////////////////////////////////////////////// 29 | 30 | To run your service: 31 | 1. Build the project 32 | 2. From the command line, run: 33 | PMU Service.exe -Install 34 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-core-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-core-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-core.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-iio-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-iio-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-iio.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-latency-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-latency-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-latency.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-lib.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2012, Intel Corporation 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | */ 13 | 14 | /* 15 | ** Written by Otto Bruggeman 16 | */ 17 | 18 | // pcm-lib.cpp : Defines the exported functions for the DLL application. 19 | // 20 | 21 | 22 | #include "pcm-lib.h" 23 | 24 | 25 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-lspci-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-lspci-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-lspci.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-memory-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-memory-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-memory.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-mmio-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-mmio-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-mmio.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-msr-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-msr-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-msr.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-numa-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-numa-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-numa.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-pcicfg-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-pcicfg-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-pcicfg.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-pcie-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-pcie-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-pcie.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-power-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-power-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-power.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-raw-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-raw-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-raw.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm-tsx-win.cpp: -------------------------------------------------------------------------------- 1 | // pcm-tsx-win.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | #include "../pcm-tsx.cpp" 7 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2011, Intel Corporation 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | */ 13 | 14 | // pcm.cpp : Defines the entry point for the console application. 15 | // 16 | 17 | #include "stdafx.h" 18 | 19 | #include "../pcm.cpp" 20 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm_lib_ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | DYNAMIC LINK LIBRARY : PMU Library Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this PMU Library DLL for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your PMU Library application. 9 | 10 | 11 | PMU Library.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | PMU Library.cpp 18 | This is the main DLL source file. 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | Other standard files: 22 | 23 | StdAfx.h, StdAfx.cpp 24 | These files are used to build a precompiled header (PCH) file 25 | named PMU Library.pch and a precompiled types file named StdAfx.obj. 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | Other notes: 29 | 30 | AppWizard uses "TODO:" comments to indicate parts of the source code you 31 | should add to or customize. 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | -------------------------------------------------------------------------------- /include/PCM/src/windows/pcm_power_ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | CONSOLE APPLICATION : pcm Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this pcm application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your pcm application. 9 | 10 | 11 | pcm.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | pcm.cpp 18 | This is the main application source file. 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | Other standard files: 22 | 23 | StdAfx.h, StdAfx.cpp 24 | These files are used to build a precompiled header (PCH) file 25 | named pcm.pch and a precompiled types file named StdAfx.obj. 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | Other notes: 29 | 30 | AppWizard uses "TODO:" comments to indicate parts of the source code you 31 | should add to or customize. 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | -------------------------------------------------------------------------------- /include/PCM/src/windows/stdafx.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009-2011, Intel Corporation 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | */ 13 | 14 | // stdafx.cpp : source file that includes just the standard includes 15 | // pcm.pch will be the pre-compiled header 16 | // stdafx.obj will contain the pre-compiled type information 17 | 18 | #include "stdafx.h" 19 | 20 | // TODO: reference any additional headers you need in STDAFX.H 21 | // and not in this file 22 | -------------------------------------------------------------------------------- /include/PCM/src/winring0/COPYRIGHT.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2007-2009 OpenLibSys.org. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 1. Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | 2. Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 15 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 16 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 17 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 19 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 21 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 | -------------------------------------------------------------------------------- /include/PCM/tests/urltest.cpp: -------------------------------------------------------------------------------- 1 | #define UNIT_TEST 1 2 | 3 | #include "../src/pcm-sensor-server.cpp" 4 | 5 | #undef UNIT_TEST 6 | 7 | std::vector urls{ 8 | "http://otto:test@www.intel.com/~otto/file1.txt", 9 | "file://localhost/c/mnt/cd/file2.txt", 10 | "ftp://otto%40yahoo.com:abcd%3B1234@www.intel.com:30/xyz.php?a=1&t=3", 11 | "gopher://otto@hostname1.intel.com:8080/file3.zyx", 12 | "www.intel.com", 13 | // "", 14 | "http://www.blah.org/file.html#firstmark", 15 | "http://www.blah.org/file.html#firstmark%21%23", 16 | "localhost" 17 | }; 18 | 19 | int main( int, char** ) { 20 | int errors = 0; 21 | for ( auto & s : urls ) { 22 | try { 23 | std::cout << s << "\n"; 24 | URL x = URL::parse( s ); 25 | x.printURL(std::cout); 26 | } catch (const std::runtime_error & x ) { 27 | std::cout << "\"" << s << "\": " << x.what() << "\n"; 28 | ++errors; 29 | } 30 | } 31 | return errors; 32 | } 33 | -------------------------------------------------------------------------------- /include/Runtime.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Zhen Peng on 7/21/20. 3 | // 4 | 5 | #ifndef PANNS_RUNTIME_H 6 | #define PANNS_RUNTIME_H 7 | 8 | #include 9 | 10 | namespace PANNS { 11 | 12 | struct Runtime { 13 | double add_to_worklist_ = 0.0; 14 | double add_to_result_ = 0.0; 15 | double pick_tops_ = 0.0; 16 | double expand_neighbors_ = 0.0; 17 | double exp_worklist_check_ = 0.0; 18 | double exp_result_check_ = 0.0; 19 | 20 | // void clear() 21 | // { 22 | // add_to_worklist_ = 0.0; 23 | // add_to_result_ = 0.0; 24 | // pick_tops_ = 0.0; 25 | // expand_neighbors_ = 0.0; 26 | // exp_worklist_check_ = 0.0; 27 | // exp_result_check_ = 0.0; 28 | // } 29 | }; 30 | 31 | } // namespace PANNS 32 | 33 | #endif //PANNS_RUNTIME_H 34 | -------------------------------------------------------------------------------- /include/Spinlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Zhen Peng on 7/20/20. 3 | // 4 | 5 | #ifndef PANNS_SPINLOCK_H 6 | #define PANNS_SPINLOCK_H 7 | 8 | #include 9 | //#include 10 | //#include 11 | 12 | namespace PANNS { 13 | 14 | class Spinlock { 15 | private: 16 | std::atomic lock_{false}; 17 | // For C++20, or Boost 1.74, this could be atomic_flag 18 | 19 | public: 20 | void lock() 21 | { 22 | for (;;) { 23 | if (!lock_.exchange(true, std::memory_order_acquire)) { 24 | break; 25 | } 26 | while (lock_.load(std::memory_order_relaxed)) { 27 | ; 28 | } 29 | } 30 | } 31 | 32 | void unlock() 33 | { 34 | lock_.store(false, std::memory_order_release); 35 | } 36 | }; 37 | 38 | } // namespace PANNS 39 | 40 | #endif //PANNS_SPINLOCK_H 41 | -------------------------------------------------------------------------------- /include/definitions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Zhen Peng on 11/11/19. 3 | // 4 | 5 | #ifndef BATCH_SEARCHING_DEFINITIONS_H 6 | #define BATCH_SEARCHING_DEFINITIONS_H 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | namespace PANNS { 13 | 14 | using dataf = float; 15 | using distf = float; 16 | const distf DISTF_MAX = std::numeric_limits::max(); 17 | const distf DISTF_MIN = std::numeric_limits::min(); 18 | using idi = uint32_t; 19 | using edgei = uint64_t; 20 | //using edgei = uint32_t; 21 | 22 | //using Candidate = std::pair; // .first: distance; .second: vertex ID 23 | //using Candidate = std::tuple; // 0: distance; 1: vertex ID; 2: flag is checked 24 | 25 | } // namespace PANNS 26 | 27 | #endif //BATCH_SEARCHING_DEFINITIONS_H 28 | -------------------------------------------------------------------------------- /include/efanna2e/exceptions.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017 ZJULearning. All rights reserved. 3 | // 4 | // This source code is licensed under the MIT license. 5 | // 6 | 7 | #ifndef EFANNA2E_EXCEPTIONS_H 8 | #define EFANNA2E_EXCEPTIONS_H 9 | 10 | #include 11 | 12 | namespace efanna2e { 13 | 14 | class NotImplementedException : public std::logic_error { 15 | public: 16 | NotImplementedException() : std::logic_error("Function not yet implemented.") {} 17 | }; 18 | 19 | } 20 | 21 | #endif //EFANNA2E_EXCEPTIONS_H 22 | -------------------------------------------------------------------------------- /include/efanna2e/index.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017 ZJULearning. All rights reserved. 3 | // 4 | // This source code is licensed under the MIT license. 5 | // 6 | #include "index.h" 7 | namespace efanna2e { 8 | Index::Index(const size_t dimension, const size_t n, Metric metric = L2) 9 | : dimension_ (dimension), nd_(n), has_built(false) { 10 | switch (metric) { 11 | case L2:distance_ = new DistanceL2(); 12 | break; 13 | default:distance_ = new DistanceL2(); 14 | break; 15 | } 16 | } 17 | Index::~Index() 18 | { 19 | // Added by Johnpzh 20 | delete distance_; 21 | // Ended by Johnpzh 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /include/efanna2e/index.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017 ZJULearning. All rights reserved. 3 | // 4 | // This source code is licensed under the MIT license. 5 | // 6 | 7 | #ifndef EFANNA2E_INDEX_H 8 | #define EFANNA2E_INDEX_H 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include "distance.h" 15 | #include "parameters.h" 16 | 17 | namespace efanna2e { 18 | 19 | class Index { 20 | public: 21 | explicit Index(const size_t dimension, const size_t n, Metric metric); 22 | 23 | 24 | virtual ~Index(); 25 | 26 | virtual void Build(size_t n, const float *data, const Parameters ¶meters) = 0; 27 | 28 | virtual void Search( 29 | const float *query, 30 | const float *x, 31 | size_t k, 32 | const Parameters ¶meters, 33 | unsigned *indices) = 0; 34 | 35 | virtual void Save(const char *filename) = 0; 36 | 37 | virtual void Load(const char *filename) = 0; 38 | 39 | inline bool HasBuilt() const 40 | { return has_built; } 41 | 42 | inline size_t GetDimension() const 43 | { return dimension_; }; 44 | 45 | inline size_t GetSizeOfDataset() const 46 | { return nd_; } 47 | 48 | inline const float *GetDataset() const 49 | { return data_; } 50 | 51 | //protected: 52 | public: 53 | const size_t dimension_; 54 | const float *data_; 55 | size_t nd_; 56 | bool has_built; 57 | Distance *distance_; 58 | }; 59 | 60 | } 61 | 62 | #endif //EFANNA2E_INDEX_H 63 | -------------------------------------------------------------------------------- /include/efanna2e/parameters.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017 ZJULearning. All rights reserved. 3 | // 4 | // This source code is licensed under the MIT license. 5 | // 6 | 7 | #ifndef EFANNA2E_PARAMETERS_H 8 | #define EFANNA2E_PARAMETERS_H 9 | 10 | #include 11 | #include 12 | #include 13 | namespace efanna2e { 14 | 15 | class Parameters { 16 | public: 17 | template 18 | inline void Set(const std::string &name, const ParamType &value) { 19 | std::stringstream sstream; 20 | sstream << value; 21 | params[name] = sstream.str(); 22 | } 23 | 24 | template 25 | inline ParamType Get(const std::string &name) const { 26 | auto item = params.find(name); 27 | if (item == params.end()) { 28 | throw std::invalid_argument("Invalid parameter name."); 29 | } else { 30 | return ConvertStrToValue(item->second); 31 | } 32 | } 33 | 34 | template 35 | inline ParamType Get(const std::string &name, const ParamType &default_value) { 36 | try { 37 | return Get(name); 38 | } catch (std::invalid_argument e) { 39 | return default_value; 40 | } 41 | } 42 | private: 43 | std::unordered_map params; 44 | 45 | template 46 | inline ParamType ConvertStrToValue(const std::string &str) const { 47 | std::stringstream sstream(str); 48 | ParamType value; 49 | if (!(sstream >> value) || !sstream.eof()) { 50 | std::stringstream err; 51 | err << "Failed to convert value '" << str << "' to type: " << typeid(value).name(); 52 | throw std::runtime_error(err.str()); 53 | } 54 | return value; 55 | } 56 | 57 | }; 58 | 59 | } 60 | 61 | #endif //EFANNA2E_PARAMETERS_H 62 | -------------------------------------------------------------------------------- /include/ligra/binary_search.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace pbbs { 6 | // the following parameter can be tuned 7 | constexpr const size_t _binary_search_base = 16; 8 | 9 | template 10 | size_t linear_search(Sequence I, typename Sequence::T v, const F& less) { 11 | for (size_t i = 0; i < I.size(); i++) 12 | if (!less(I[i],v)) return i; 13 | return I.size(); 14 | } 15 | 16 | // return index to first key greater or equal to v 17 | template 18 | size_t binary_search(Sequence I, typename Sequence::T v, const F& less) { 19 | size_t start = 0; 20 | size_t end = I.size(); 21 | while (end-start > _binary_search_base) { 22 | size_t mid = (end+start)/2; 23 | if (!less(I[mid],v)) end = mid; 24 | else start = mid + 1; 25 | } 26 | return start + linear_search(I.slice(start,end),v,less); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /include/ligra/dyn_arr.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "utils.h" 4 | 5 | #define MIN_BKT_SIZE 2048 6 | 7 | template 8 | struct dyn_arr { 9 | E* A; 10 | size_t size; 11 | size_t capacity; 12 | bool alloc; 13 | 14 | dyn_arr() : A(NULL), size(0), capacity(0), alloc(false) {} 15 | dyn_arr(size_t s) : size(0), capacity(s), alloc(true) { A = newA(E, s); } 16 | dyn_arr(E* _A, long _size, long _capacity, bool _alloc) : 17 | A(_A), size(_size), capacity(_capacity), alloc(_alloc) {} 18 | 19 | void del() { 20 | if (alloc) { 21 | free(A); 22 | alloc = false; 23 | } 24 | } 25 | 26 | void clear() { size = 0; } 27 | 28 | inline void resize(size_t n) { 29 | if (n + size > capacity) { 30 | size_t new_capacity = max(2*(n + size), (size_t)MIN_BKT_SIZE); 31 | E* nA = newA(E, new_capacity); 32 | granular_for(i, 0, size, 2000, nA[i] = A[i];); 33 | if (alloc) { 34 | free(A); 35 | } 36 | A = nA; 37 | capacity = new_capacity; 38 | alloc = true; 39 | } 40 | } 41 | 42 | inline void insert(E val, size_t pos) { 43 | A[size + pos] = val; 44 | } 45 | 46 | template 47 | inline void copyIn(F f, size_t n) { 48 | resize(n); 49 | granular_for(i, 0, n, 2000, A[size + i] = f[i];); 50 | size += n; 51 | } 52 | 53 | template 54 | inline void copyInF(F f, size_t n) { 55 | resize(n); 56 | granular_for(i, 0, n, 2000, A[size + i] = f(i);); 57 | size += n; 58 | } 59 | 60 | }; 61 | 62 | 63 | -------------------------------------------------------------------------------- /include/ligra/maybe.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | using namespace std; 6 | 7 | template 8 | struct Maybe { 9 | // pays an extra byte for NONE/SOME 10 | // avoid Maybe*---this is basically free otherwise 11 | bool exists; 12 | T t; 13 | Maybe(const T& _t) : t(_t), exists(true) {} 14 | Maybe() : exists(false) {} 15 | }; 16 | 17 | inline const Maybe > wrap(const uintE& l, const uintE& r) { 18 | auto t = Maybe >(make_tuple(l, r)); 19 | t.exists = (l != UINT_E_MAX) && (r != UINT_E_MAX); 20 | return t; 21 | } 22 | 23 | template 24 | inline const Maybe > wrap(const L& l, const Maybe& r) { 25 | auto t = Maybe >(make_tuple(l, getT(r))); 26 | t.exists = r.exists; 27 | return t; 28 | } 29 | 30 | template 31 | inline Maybe > wrap(const Maybe& l, const R& r) { 32 | auto t = Maybe >(make_tuple(getT(l), r)); 33 | t.exists = l.exists; 34 | return t; 35 | } 36 | 37 | template 38 | inline Maybe > wrap(const Maybe& l, const Maybe& r) { 39 | auto t = Maybe >(make_tuple(getT(l), getT(r))); 40 | t.exists = l.exists && r.exists; 41 | return t; 42 | } 43 | 44 | template 45 | inline bool isSome(const Maybe& m) { 46 | return m.exists; 47 | } 48 | 49 | template 50 | inline T getT(const Maybe& m) { 51 | return m.t; 52 | } 53 | -------------------------------------------------------------------------------- /notes/pseudo_graphit_for_anns.cpp: -------------------------------------------------------------------------------- 1 | iQAN(graph G, starting point P, query Q, queue capacity L, output size K) { 2 | priority_queue pq; // GraphIt has 3 | P.dist = compute_dist(P, Q); // GraphIt misses 4 | pq.insert(p); // GraphIt has 5 | 6 | while (pq has unchecked vertices) { // GraphIt misses 7 | v = the 1st unchecked vertex in pq; // GraphIt misses 8 | v.checked = true; // GraphIt misses 9 | for (neighbor u of v if visited[u] == false) { // GraphIt has 10 | visited[u] = true; 11 | u.dist = compute_dist(u, Q); // GraphIt misses 12 | pq.insert(u); // GraphIt has 13 | } 14 | if (pq.size() > L) { 15 | pq.resize(L); // GraphIt misses 16 | } 17 | } 18 | 19 | return first K vertices in pq; 20 | } 21 | 22 | 23 | iQAN(graph G, starting point P, query Q, queue capacity L, output size K) { 24 | priority_queue pq; // GraphIt has 25 | P.dist = compute_dist(P, Q); // GraphIt misses 26 | pq.insert(p); // GraphIt has 27 | priority_queue ret; // GraphIt misses 28 | 29 | while (ret.size() < L || ret.updated) { // GraphIt misses 30 | vs = the 1st bucket in pq; // GraphIt has 31 | clear the 1st bucket in pq; // GraphIt has 32 | for_para (v in vs) { // GraphIt has 33 | for (neighbor u of v if visited[u] == false) { // GraphIt has 34 | visited[u] = true; 35 | u.dist = compute_dist(u, Q); // GraphIt misses 36 | pq.insert(u); // GraphIt has 37 | if (unchecked[u] == true) { 38 | ret.updated = ret.insert(u); 39 | } 40 | } 41 | } 42 | if (ret.size() > L) { // GraphIt misses (not sure) 43 | ret.resize(L); // GraphIt misses 44 | } 45 | } 46 | 47 | return first K vertices in ret; 48 | } -------------------------------------------------------------------------------- /notes/pseudo_top_m_by_Ligra.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Zhen Peng on 11/25/2020. 3 | // 4 | 5 | #include "ligra.h" 6 | 7 | struct Search { 8 | float *distances_; 9 | bool *is_visited_; 10 | float *data_load_; 11 | float *query_load_; 12 | int query_id_; 13 | 14 | Search(float *dist, bool *is_visited, float *data_load, float *query_load, int query_id) : 15 | distances_(dist), is_visited_(is_visited), data_load_(data_load), query_load_(query_load), query_id_(query_id) {} 16 | inline bool update(int s, int d) 17 | { 18 | distances_[d] = compute_distance(&query_load_[query_id_], &data_load_[d]); 19 | is_visited_[d] = 1; 20 | } 21 | 22 | inline bool cond (int d) 23 | { 24 | return is_visited_[d]; 25 | } 26 | 27 | float compute_distance(float *query_data, float *v_data) 28 | { 29 | // Compute distance and return 30 | } 31 | } 32 | 33 | void Compute( 34 | graph GA, 35 | int query_id, 36 | float *data_load, 37 | float *query_load, 38 | int starting_point) 39 | { 40 | float *distances = new float[GA.n]; 41 | bool *is_visited = new bool[GA.n]; 42 | priorityQueue rts; // final results 43 | rts.add(starting_point); 44 | vertexSubset Frontier = find_top_m(rts); // or top-1 45 | while (!Frontier.isEmpty()) { 46 | vertexSubset output = edgeMap(GA, Frontier, Search(...)); // output only contains scalar IDs. 47 | for (int v_id : output) { 48 | float dist = distances[v_id]; 49 | rts.add({v_id, dist}); // add new element to the queue. 50 | } 51 | Frontier = find_top_m(rts); 52 | } 53 | } -------------------------------------------------------------------------------- /notes/pseudo_two_queues_search.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Zhen Peng on 7/10/20. 3 | // 4 | 5 | /* 6 | * The base line algorithm SimpleSearch. 7 | * Simple Search selects the closest (top 1) vertex and accesses its neighbors in every iteration. 8 | * This version's difference is using 2 queues for results and unvisited vertices, respectively. 9 | * The original version only uses 1 queue. 10 | */ 11 | Queue SimpleSearch_using_two_queues( 12 | Graph G, // Graph data 13 | Vertex P, // The starting vertex 14 | Query Q, // Query point 15 | Int L, // Queue size 16 | Int K) // Results size 17 | { 18 | R = The result queue of capacity L; // A priority queue 19 | W = The worklist queue of capacity L; // A priority queue 20 | R = empty; W = empty; 21 | 22 | // Initilzation 23 | Compute dist(P, Q); 24 | Add P into W; 25 | Mark P as visited; 26 | 27 | while (W is not empty) { 28 | Vertex V = W[0]; // V is the closest unvisited vertex 29 | Remove W[0] from W; 30 | if (R.size == L && dist(V, Q) > dist(R[L - 1], Q)) { 31 | // Stop condition 32 | break; 33 | } 34 | Add V into R; 35 | // Access all neighbors of V 36 | for (every neighbor N of V) { 37 | if (N is unvisited) { 38 | Mark N as visited; 39 | Compute dist(N, Q); 40 | Add N into W; 41 | } 42 | } 43 | } 44 | 45 | return the first K vertices in R; 46 | } -------------------------------------------------------------------------------- /scripts/bg7/sh.sh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/zsh 2 | 3 | data_dir="/scratch/zpeng/data" 4 | app_tag="worker_std_deviation" 5 | num_t=32 6 | bin="python ../scripts/test78.PSS_v5_work_std_deviation_ranged_L.py ./PSS_v5_worker_std_deviation_LG" 7 | 8 | set -x 9 | 10 | ################## 11 | data="deep100m" 12 | L_master_lower=90 13 | L_master_upper=150 14 | L_master_step=3 15 | 16 | for std_dev_threshold in 0.2 0.4 0.8 1.6 3.2; do 17 | tag="${app_tag}.T${num_t}.SD${std_dev_threshold}" 18 | eval ${bin} ${data_dir} ${data} ${tag} ${num_t} ${L_master_lower} ${L_master_upper} ${L_master_step} 0 0 0 ${std_dev_threshold} 19 | done 20 | 21 | 22 | 23 | 24 | set +x 25 | 26 | 27 | -------------------------------------------------------------------------------- /scripts/bg7/sh2.iter_mean.sh: -------------------------------------------------------------------------------- 1 | #!/home/zpeng/local/bin/zsh 2 | 3 | cd /home/zpeng/pppp/clion/panns_mac/cmake-build-release 4 | #data_path="/scratch/zpeng/data/deep1b" 5 | #data_name="deep10M" 6 | data_path="/scratch/zpeng/data/sift1m" 7 | data_name="sift" 8 | l_lower=100 9 | l_upper=100 10 | l_step=1 11 | num_t=8 12 | x_start=50 13 | x_step=1000 14 | 15 | ./profile_para_single_query_search_simple_v3_large_graph_ranged ${data_path}/${data_name}_base.fvecs ${data_path}/${data_name}_query.fvecs ${data_path}/${data_name}.nsg ${l_lower} 100 ${data_path}/output.ivecs ${data_path}/${data_name}.true-100_NN.v2.binary ${num_t} ${l_upper} ${l_step} ${x_start} ${x_step} -------------------------------------------------------------------------------- /scripts/bg7/sh59.hnsw_sift1m.sh: -------------------------------------------------------------------------------- 1 | data_dir="/scratch/zpeng/data" 2 | data="sift1m" 3 | app="hnsw_search" 4 | app_tag="hnsw" 5 | 6 | bin="python3 ../scripts/test45.hnsw_find_ef.py" 7 | 8 | P_target=0.999 9 | tag="${app_tag}_find_ef_P${P_target}" 10 | ef_low=1 11 | ef_up=800 12 | P_ts="0.900 0.910 0.920 0.930 0.940 \ 13 | 0.950 0.960 0.970 0.980 0.990 \ 14 | 0.991 0.992 0.993 0.994 0.995 \ 15 | 0.996 0.997 0.998 0.999" 16 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${ef_low} ${ef_up} ${P_ts} -------------------------------------------------------------------------------- /scripts/bg7/sh60.hnsw_gist1m.sh: -------------------------------------------------------------------------------- 1 | data_dir="/scratch/zpeng/data" 2 | data="gist1m" 3 | app="hnsw_search" 4 | app_tag="hnsw" 5 | 6 | bin="python3 ../scripts/test45.hnsw_find_ef.py" 7 | 8 | P_target=0.999 9 | tag="${app_tag}_find_ef_P${P_target}" 10 | ef_low=1 11 | ef_up=23000 12 | P_ts="0.900 0.910 0.920 0.930 0.940 \ 13 | 0.950 0.960 0.970 0.980 0.990 \ 14 | 0.991 0.992 0.993 0.994 0.995 \ 15 | 0.996 0.997 0.998 0.999" 16 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${ef_low} ${ef_up} ${P_ts} -------------------------------------------------------------------------------- /scripts/bg7/sh61.hnsw_deep10m.sh: -------------------------------------------------------------------------------- 1 | data_dir="/scratch/zpeng/data" 2 | data="deep10m" 3 | app="hnsw_search" 4 | app_tag="hnsw" 5 | 6 | bin="python3 ../scripts/test45.hnsw_find_ef.py" 7 | 8 | P_target=0.999 9 | tag="${app_tag}_find_ef_P${P_target}" 10 | ef_low=1 11 | ef_up=2700 12 | P_ts="0.900 0.910 0.920 0.930 0.940 \ 13 | 0.950 0.960 0.970 0.980 0.990 \ 14 | 0.991 0.992 0.993 0.994 0.995 \ 15 | 0.996 0.997 0.998 0.999" 16 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${ef_low} ${ef_up} ${P_ts} -------------------------------------------------------------------------------- /scripts/bg7/sh62.hnsw_sift100m.sh: -------------------------------------------------------------------------------- 1 | data_dir="/scratch/zpeng/data" 2 | data="sift100m" 3 | app="hnsw_search" 4 | app_tag="hnsw" 5 | 6 | bin="python3 ../scripts/test45.hnsw_find_ef.py" 7 | 8 | P_target=0.999 9 | tag="${app_tag}_find_ef_P${P_target}" 10 | ef_low=1 11 | ef_up=4300 12 | P_ts="0.900 0.910 0.920 0.930 0.940 \ 13 | 0.950 0.960 0.970 0.980 0.990 \ 14 | 0.991 0.992 0.993 0.994 0.995 \ 15 | 0.996 0.997 0.998 0.999" 16 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${ef_low} ${ef_up} ${P_ts} -------------------------------------------------------------------------------- /scripts/bg7/sh63.hnsw_deep100m.sh: -------------------------------------------------------------------------------- 1 | data_dir="/scratch/zpeng/data" 2 | data="deep100m" 3 | app="hnsw_search" 4 | app_tag="hnsw" 5 | 6 | bin="python3 ../scripts/test45.hnsw_find_ef.py" 7 | 8 | P_target=0.999 9 | tag="${app_tag}_find_ef_P${P_target}" 10 | ef_low=1 11 | ef_up=10000 12 | P_ts="0.900 0.910 0.920 0.930 0.940 \ 13 | 0.950 0.960 0.970 0.980 0.990 \ 14 | 0.991 0.992 0.993 0.994 0.995 \ 15 | 0.996 0.997 0.998 0.999" 16 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${ef_low} ${ef_up} ${P_ts} -------------------------------------------------------------------------------- /scripts/bg7/sh64.hnsw_deep1b.sh: -------------------------------------------------------------------------------- 1 | data_dir="/scratch/zpeng/data" 2 | data="deep1b" 3 | app="hnsw_search" 4 | app_tag="hnsw_low_ef" 5 | #app_tag="hnsw" 6 | 7 | bin="python3 ../scripts/test45.hnsw_find_ef.low_ef.py" 8 | #bin="python3 ../scripts/test45.hnsw_find_ef.py" 9 | 10 | P_target=0.900 11 | tag="${app_tag}_find_ef_P${P_target}" 12 | ef_low=4000 13 | ef_up=40000 14 | P_ts="0.900 0.950" 15 | #ef_up=160000 16 | #P_ts="0.990 0.995 0.999" 17 | #P_ts="0.900 0.910 0.920 0.930 0.940 \ 18 | #0.950 0.960 0.970 0.980 0.990 \ 19 | #0.991 0.992 0.993 0.994 0.995 \ 20 | #0.996 0.997 0.998 0.999" 21 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${ef_low} ${ef_up} ${P_ts} -------------------------------------------------------------------------------- /scripts/bg7/sh65.hnsw_sift1b.sh: -------------------------------------------------------------------------------- 1 | data_dir="/scratch/zpeng/data" 2 | data="sift1b" 3 | app="hnsw_search" 4 | app_tag="hnsw_low_ef" 5 | #app_tag="hnsw" 6 | 7 | bin="python3 ../scripts/test45.hnsw_find_ef.low_ef.py" 8 | #bin="python3 ../scripts/test45.hnsw_find_ef.py" 9 | 10 | P_target=0.900 11 | tag="${app_tag}_find_ef_P${P_target}" 12 | ef_low=4000 13 | ef_up=40000 14 | P_ts="0.900 0.950" 15 | #P_ts="0.900 0.910 0.920 0.930 0.940 \ 16 | #0.950 0.960 0.970 0.980 0.990 \ 17 | #0.991 0.992 0.993 0.994 0.995 \ 18 | #0.996 0.997 0.998 0.999" 19 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${ef_low} ${ef_up} ${P_ts} -------------------------------------------------------------------------------- /scripts/bg7/sh72.NSG_seq_sift1b.sh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/zsh 2 | 3 | if [[ "$#" -ne 2 ]]; then 4 | echo "Usage: $(basename $0) " 5 | exit 6 | elif [[ "$2" != "sift1b" ]]; then 7 | echo "Error: the data_name should be sift1b not $2 ." 8 | exit 9 | fi 10 | 11 | set -x 12 | 13 | #data_dir="/home/zpeng/data" 14 | #data_dir="/scratch/zpeng" 15 | #data_dir="/scratch/zpeng/data" 16 | #data=deep1b 17 | data_dir="$1" 18 | data="$2" 19 | 20 | ############### 21 | #### SGS 22 | ############### 23 | bin="python3 ../scripts/test48.find_L_simple_search.py" 24 | app="profile_find_L_seq_single_query_simple_search_large_graph" 25 | app_label="NSG_SEQ" 26 | #num_t=16 27 | 28 | #P_target=0.900 29 | #tag="${app_label}_find_L_P${P_target}" 30 | #L_low=15900 31 | #L_up=16200 32 | #P_ts="0.9" 33 | #eval ${bin} ${app} ${data_dir} ${data} ${tag} ${L_low} ${L_up} ${P_ts} 34 | 35 | P_target=0.990 36 | tag="${app_label}_find_L_P${P_target}" 37 | L_low=26200 38 | L_up=80000 39 | P_ts="0.950" 40 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${L_low} ${L_up} ${P_ts} 41 | 42 | ####### 43 | #output_files="output.${data}.${app_label}_find_L_P0.9" 44 | #table_file="output.${data}.${app_label}_find_L_collected.table.txt" 45 | #cat ${output_files}*.table.txt > ${table_file} 46 | 47 | set +x 48 | 49 | 50 | -------------------------------------------------------------------------------- /scripts/bg7/sh74.NSG_seq_deep1b.sh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/zsh 2 | 3 | if [[ "$#" -ne 2 ]]; then 4 | echo "Usage: $(basename $0) " 5 | exit 6 | elif [[ "$2" != "deep1b" ]]; then 7 | echo "Error: the data_name should be deep1b not $2 ." 8 | exit 9 | fi 10 | 11 | set -x 12 | 13 | #data_dir="/home/zpeng/data" 14 | #data_dir="/scratch/zpeng" 15 | #data_dir="/scratch/zpeng/data" 16 | #data=deep1b 17 | data_dir="$1" 18 | data="$2" 19 | 20 | ############### 21 | #### SGS 22 | ############### 23 | bin="python3 ../scripts/test48.find_L_simple_search.py" 24 | app="profile_find_L_seq_single_query_simple_search_large_graph" 25 | app_label="NSG_SEQ" 26 | #num_t=16 27 | 28 | #P_target=0.900 29 | #tag="${app_label}_find_L_P${P_target}" 30 | #L_low=20800 31 | #L_up=21100 32 | #P_ts="0.9" 33 | #eval ${bin} ${app} ${data_dir} ${data} ${tag} ${L_low} ${L_up} ${P_ts} 34 | 35 | P_target=0.990 36 | tag="${app_label}_find_L_P${P_target}" 37 | L_low=41100 38 | L_up=80000 39 | P_ts="0.950" 40 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${L_low} ${L_up} ${P_ts} 41 | 42 | 43 | 44 | ####### 45 | #output_files="output.${data}.${app_label}_find_L_P0.9" 46 | #table_file="output.${data}.${app_label}_find_L_collected.table.txt" 47 | #cat ${output_files}*.table.txt > ${table_file} 48 | 49 | set +x 50 | 51 | 52 | -------------------------------------------------------------------------------- /scripts/bg7/sh76.hnsw_deep1b.sh: -------------------------------------------------------------------------------- 1 | #data_dir="/scratch/zpeng" 2 | data_dir="/scratch/zpeng/data" 3 | data="deepb" 4 | app="hnsw_search" 5 | app_tag="hnsw" 6 | 7 | bin="python3 ../scripts/test45.hnsw_find_ef.py" 8 | 9 | P_target=0.999 10 | tag="${app_tag}_find_ef_P${P_target}" 11 | ef_low=1 12 | ef_up=10000 13 | P_ts="0.900 0.910 0.920 0.930 0.940 \ 14 | 0.950 0.960 0.970 0.980 0.990 \ 15 | 0.991 0.992 0.993 0.994 0.995 \ 16 | 0.996 0.997 0.998 0.999" 17 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${ef_low} ${ef_up} ${P_ts} -------------------------------------------------------------------------------- /scripts/bg7/sh94.PSS_v5_find_L_every_step_merge_fixed_local_L_deep100m.sh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/zsh 2 | 3 | set -x 4 | 5 | data_dir="/scratch/zpeng/data" 6 | #data_dir="/home/zpeng/data" 7 | #data_dir="/scratch/zpeng" 8 | bin="python3 ../scripts/test79.PSS_v5_find_L_every_step_merge_fixed_local_L.py" 9 | app="PSS_v5_find_L_every_step_merge_fixed_local_L_LG" 10 | num_t=32 11 | #X=8 12 | for X in 1 2 4 8 16 32 64 128 256; do 13 | 14 | app_tag="fixed_local_L" 15 | 16 | 17 | ########### 18 | # DEEP100M 19 | ########### 20 | data=deep100m 21 | ## 22 | P_target=0.999 23 | tag="${app_tag}_X${X}_T${num_t}_P${P_target}" 24 | L_master_low=80 25 | L_master_up=4000 26 | L_local=100 27 | P_ts="0.999" 28 | #P_ts="0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98" 29 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${num_t} ${L_master_low} ${L_master_up} ${L_local} ${X} ${P_ts} 30 | 31 | ############ 32 | ## SIFT100M 33 | ############ 34 | #data=sift100m 35 | ### 36 | #P_target=0.999 37 | #tag="${app_tag}_T${num_t}_P${P_target}" 38 | #L_low=80 39 | #L_up=1000 40 | #P_ts="0.900 0.990 0.995 0.997 0.999" 41 | ##P_ts="0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98" 42 | #eval ${bin} ${app} ${data_dir} ${data} ${tag} ${num_t} ${L_low} ${L_up} ${X} ${P_ts} 43 | done 44 | set +x 45 | 46 | 47 | -------------------------------------------------------------------------------- /scripts/bg7/sh95.PSS_v5_find_L_fixed_local_L_update_positions_deep100m.sh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/zsh 2 | 3 | set -x 4 | 5 | data_dir="/scratch/zpeng/data" 6 | #data_dir="/home/zpeng/data" 7 | #data_dir="/scratch/zpeng" 8 | bin="python3 ../scripts/test79.PSS_v5_find_L_every_step_merge_fixed_local_L.py" 9 | app="PSS_v5_find_L_fixed_local_L_update_positions_LG" 10 | num_t=32 11 | #X=8 12 | for X in 1 2 4 8 16 32 64 128 256; do 13 | 14 | app_tag="intervals_vs_update_pos" 15 | 16 | 17 | ########### 18 | # DEEP100M 19 | ########### 20 | data=deep100m 21 | ## 22 | P_target=0.999 23 | tag="${app_tag}_X${X}_T${num_t}_P${P_target}" 24 | L_master_low=80 25 | L_master_up=4000 26 | L_local=100 27 | P_ts="0.999" 28 | #P_ts="0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98" 29 | eval ${bin} ${app} ${data_dir} ${data} ${tag} ${num_t} ${L_master_low} ${L_master_up} ${L_local} ${X} ${P_ts} 30 | 31 | ############ 32 | ## SIFT100M 33 | ############ 34 | #data=sift100m 35 | ### 36 | #P_target=0.999 37 | #tag="${app_tag}_T${num_t}_P${P_target}" 38 | #L_low=80 39 | #L_up=1000 40 | #P_ts="0.900 0.990 0.995 0.997 0.999" 41 | ##P_ts="0.9 0.91 0.92 0.93 0.94 0.95 0.96 0.97 0.98" 42 | #eval ${bin} ${app} ${data_dir} ${data} ${tag} ${num_t} ${L_low} ${L_up} ${X} ${P_ts} 43 | done 44 | set +x 45 | 46 | 47 | -------------------------------------------------------------------------------- /scripts/bg7/sh98.PSS_v5_find_L_index_adaptive_merge_deep100m_sift100m.sh: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/zsh 2 | 3 | data_dir="/scratch/zpeng/data" 4 | #data_dir="/home/zpeng/data" 5 | #data_dir="/scratch/zpeng" 6 | app_tag="index_adaptive_merge" 7 | num_t=32 8 | bin="python ../scripts/test76.PSS_v5_find_L_index_adaptive_merge.py ./PSS_v5_find_L_index_adaptive_merge_LG" 9 | 10 | set -x 11 | ################## 12 | data="deep100m" 13 | index_ratio="0.9" 14 | L_lower=90 15 | L_upper=800 16 | #L_upper=110 17 | 18 | P_target="0.995 0.996 0.997 0.998 0.999" 19 | tag="${app_tag}.T${num_t}.XR${index_ratio}" 20 | eval ${bin} ${data_dir} ${data} ${tag} ${num_t} ${L_lower} ${L_upper} ${index_ratio} ${P_target} 21 | #done 22 | # 23 | ################### 24 | #data="sift100m" 25 | #L_lower=90 26 | #L_upper=400 27 | ##L_upper=110 28 | # 29 | #P_target="0.9 0.99 0.995 0.997 0.999" 30 | # 31 | ##for index_ratio in 1.1 1.0 0.6 0.5; do 32 | #for index_ratio in 1.1 1.0 0.9 0.8 0.7 0.6 0.5; do 33 | ##for index_ratio in 1.1 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1; do 34 | # tag="${app_tag}.T${num_t}.XR${index_ratio}" 35 | # eval ${bin} ${data_dir} ${data} ${tag} ${num_t} ${L_lower} ${L_upper} ${index_ratio} ${P_target} 36 | #done 37 | 38 | ################### 39 | ### test 40 | #data="deep100m" 41 | #L_lower=90 42 | #L_upper=800 43 | ##L_upper=110 44 | # 45 | #P_target="0.9 0.99 0.995 0.997 0.999" 46 | # 47 | #for index_ratio in 0.5; do 48 | # tag="nolimit.${app_tag}.T${num_t}.XR${index_ratio}" 49 | # eval ${bin} ${data_dir} ${data} ${tag} ${num_t} ${L_lower} ${L_upper} ${index_ratio} ${P_target} 50 | #done 51 | 52 | set +x 53 | 54 | 55 | -------------------------------------------------------------------------------- /scripts/cpuinfo.py: -------------------------------------------------------------------------------- 1 | #! python3 2 | 3 | with open("/proc/cpuinfo") as fin: 4 | print("processor:\tphysical id:\tcore id:") 5 | for line in fin: 6 | line = line.strip() 7 | # print(line) 8 | # continue 9 | # if line == "": 10 | # continue 11 | columns = line.split() 12 | if len(columns) == 0: 13 | continue 14 | if columns[0] == "processor": 15 | print(columns[-1], end="") 16 | elif columns[0] == "physical": 17 | print(F"\t{columns[-1]}", end="") 18 | elif columns[0] == "core": 19 | print(F"\t{columns[-1]}") 20 | -------------------------------------------------------------------------------- /scripts/deprecated/curve_engine.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/bash 2 | ####! /usr/local/bin/zsh 3 | ####! /bin/bash 4 | 5 | if [ $# -lt 6 ]; then 6 | echo "Usage: $0