From 9eea0a726ffd7dd8f83bbd3a4c5730322c763084 Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Fri, 7 Jul 2023 02:33:15 +0800 Subject: doc: Add comments Signed-off-by: KunoiSayami --- publish_0630.cu | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'publish_0630.cu') diff --git a/publish_0630.cu b/publish_0630.cu index 583b46f..31e66c9 100644 --- a/publish_0630.cu +++ b/publish_0630.cu @@ -143,17 +143,14 @@ template class ReadHelper_ { /// 用來存放文件名 char const *filename; - static constexpr size_t REVERSED_BLOCK = 256; - /// 用於生成讀入時要跳過的數的數量 auto genRandomRow(size_t total_row) const { /// 檢查是否滿足需要跳過行數的條件 if (total_row != 0) { /// 檢查總行數是否少於需要讀入的數量相加 - assert(total_row > (population_length + sample_length + REVERSED_BLOCK)); + assert(total_row > (population_length + sample_length)); - return randomRow(total_row - population_length - sample_length - - REVERSED_BLOCK); + return randomRow(total_row - population_length - sample_length); } /// 否則返回 0 則會不跳過 return 0UL; @@ -217,7 +214,7 @@ public: read_number = 0; /// 將剩下的資料存入 vector 中 - auto remain = population_length + REVERSED_BLOCK; + auto remain = population_length; for (key_type i; read_number < remain && !fin.eof(); store_into_vector(i)) { fin >> i; read_number++; -- cgit v1.3.1