contributed by < mickey30606
>
目前
make test
分數 95/100
HackMD 筆記不是讓你張貼完整程式碼的地方,此處著重於「開發紀錄」,亦即你的觀察、描述遭遇到的問題,還有如何克服和改進。
merge()
a
來維持排序的 stability 。改進漢語表達!
merge_final()
merge()
相同,不過有將 merge 完的 list 變成 doubly linked list 。merge_final()
的後半段,是將剩餘的 linked list 變成雙向的,因為擔心那個迴圈跑太久,所以設定了一個 8-bit 的 count
,若是 overflow ,則會呼叫一次 cmp()
,看註解是說,可以在 cmp()
中定期呼叫 cond_resched()
(目前唯一想到的解法是維護一個 global variable ),這樣 cpu 就不會一直卡在這個迴圈裡面。在論文中有提到
a) Pre-processing: We pre-process measurements prior to statistical processing. We discard measurements that are larger than the p percentile, for various values of p.
並在 dudect/src/dudect.h
中有看到程式碼的實作
在第一次的 measurement 做完之後,程式會將紀錄下的結果進行排序,然後依照百分比,取得在該百分比下能接受的最大值。
percentile()
當中每次的 a
和 size
都一樣,那位什麼不先排序好之後在乎叫到這個函式?1 - (pow(0.5, 10 * (double)(i + 1) / DUDECT_NUMBER_PERCENTILES))
是沒有什麼理論解釋的,只是大概去抓符合 distribution 的數值,那有什麼比較好的解法嗎?讀論文!
jservImage Not Showing Possible ReasonsLearn More →
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
並在之後的 measurement 當中只要大於 ctx->percentiles[crop_index]
的測量值,都不會加入計算。
不過之後取得最終值 t
的程式碼中一樣是取得最大值作為最終的值,那有沒有進行 crop 目前看來沒有達成原本的目的?