Shau ming Zheng

@shauming1020

Joined on Mar 17, 2020

  • contributed by < shauming1020 > 待釐清的議題 quiz8 測驗 1 [x] 狀態壓縮、Dynamic Programming [x] 理解遞迴版本 recursive-nos1.c [x] 說明 interative-nos1.c 和 interative-nos2.c 之間的差異,為何 interative-nos2.c 執行時間較短呢 ? [ ] 嘗試實作不同上述的程式碼 (限制為 C99/C11 + GNU extensions),應比較遞迴和非遞迴的形式在效能的落差,並分析時間與空間複雜度
     Like  Bookmark
  • contributed by < shauming1020 > Requirements [x] Ensure signature matched with the requirements described in RISC-V Compliance Tests. [x] Check the generated VCD file and use GTKwave to view the waveform. [x] Explain how your program is executed along with Reindeer Simulation. [x] Summarize how RISC-V Compliance Tests works and why the signature should be matched. [ ] Explain how Reindeer works with Verilator. [x] What is 2 x 2 Pipeline? How can we benefit from such pipeline design?
     Like  Bookmark
  • contributed by < shauming1020 > 測驗 1 #include <stdio.h> #include <stdlib.h> double divop(double orig, int slots) { if (slots == 1 || orig == 0) return orig; int od = slots & 1;
     Like  Bookmark
  • Bubble Sort contributed by 王傑世 (https://hackmd.io/4-oWQOprRnCLu3ZeJy31kA?view) :::spoiler Assembly code .data arr: .word 2, 3, 7, 4, 1 .text main: la s0, arr
     Like  Bookmark
  • Count Leading Zero contributed by 鄭惟 (https://hackmd.io/@WeiCheng14159/rkUifs2Hw) :::spoiler Assembly Code .data input: .word 0x0000000f one: .word 0x80000000 str1: .string "clz value of " str2: .string " is "
     Like  Bookmark
  • contributed by < shauming1020 > 測驗 1 轉換程式 float fp32tobf16(float x) { float y = x; int *py = (int *) &y; unsigned int exp, man;
     Like  Bookmark
  • contributed by < shauming1020 > 測驗 1 int hammingDistance(int x, int y) { return __builtin_popcount(x OP y); } population count 簡稱 popcount 或叫 sideways sum,是計算數值的二進位表示中,有多少位元是 1 Hamming Distance 計算兩數之間相異 bit 個數,$x \oplus y$ 先將相異的 bit 位置設為 1 後再透過 __builtin_popcount 求出 1 的個數,即為 Hamming Distance
     Like  Bookmark
  • contributed by < shauming1020 > Power Function Given an integer x and a positive number y, write a function that computes $x^y$. I referenced the Write an iterative O(Log y) function for pow(x, y) to implement a function with $O(Log y)$ time complexity and $O(1)$ extra space. C-code // Iterative C program to implement pow(x, n) #include <stdio.h>
     Like  Bookmark
  • contributed by < shauming1020 > 測驗 1 int asr_i(signed int m, unsigned int n) { const int logical = (((int) -1) OP1) > 0; unsigned int fixu = -(logical & (OP2)); int fix = *(int *) &fixu; return (m >> n) | (fix ^ (fix >> n)); }
     Like  Bookmark
  • contributed by < shauming1020 > 效能表現與分析 視覺化 ternary search tree + bloom filter 的效能表現並分析 要考慮到 prefix search 的特性還有詞彙的涵蓋率 限用 gnuplot 來製圖 測量在不同情境下 res = tst_search(root, word); 的執行時間
     Like  Bookmark
  • contributed by < shauming1020 > 測驗1 bool is_ascii(const char str[], size_t size) { if (size == 0) return false; int i = 0; while ((i + 8) <= size) { uint64_t payload;
     Like  Bookmark
  • contributed by < shauming1020 > 環境 $uname -a Linux dcmc-System-Product-Name 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ gcc --version gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO
     Like  Bookmark
  • contributed by < shauming1020 > Q1. 解釋程式運作原理 解釋上述程式運作原理,搭配 Graphviz,比照 Linked List 練習題 在 HackMD 筆記上視覺化展現; digraph structs { rankdir=LR; node[shape=record];
     Like  Bookmark