fennecJ

@fennecJ

Joined on Sep 8, 2020

  • contributed by < fennecJ > Reviewed by HenryChaing 學到很多之前曾未想過得串列實作方式,其他留言放在內文。 開發環境 # gcc --version gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO
     Like  Bookmark
  • contributed by < fennecJ > 第一週測驗題 測驗一 程式運作原理 程式參考 Optimized QuickSort — C Implementation (Non-Recursive) 的作法,將給定的 list 分為 pivot, 比 pivot 小的 left list 以及比 pivot 大的 right list 。假設我們有一個 list 如下: digraph G { node[shape=plaintext]; pivot;
     Like 2 Bookmark
  • 因為自動飲料機而延畢的那一年 閱讀啟發 contributed by fennecJ 作者嘗試用他的專業解決真實世界發生的問題,並將過程遇到的困難和啟發記錄下來。其中,我印象較深刻的部份有幾點: 學用落差 作者在文章中提及「除了資工系的學生不會寫程式,機械系的學生不會做機械,現在又多一條電工系的學生不會焊電路,這世界到底怎麼了啊。」可以看出高等教育逐漸和工作現場脫節。 一項產業進步的速度,很大程度取決於做實驗修正問題的速度 在系列文第 8 篇中,描寫了機械設計迭代速度曠日費時。相較之下,軟體因為能快速實驗修正的特性因此進步速度非常快。不免令人擔心會不會跟不上許多飛快發展的新技術。不過我還是相信真正重要,關鍵的知識,往往不會因為新技術的發展而顯的過時,唯有深刻掌握諸如線性代數、演算法、資料結構等基礎知識,才能在變化迅速的時代中站穩腳步。 重新定義問題
     Like  Bookmark
  • contributed by < fennecJ > 昨天聽了 Jserv 開的直播--資訊科技產業專案設計 ,裡面提到了一個很有趣的問題 : <br> 有沒有辦法不用 recursion 並 Invert binary tree in O(1) space ?( 即無法使用 stack/queue 等額外的資料結構輔助 ) 要回答這個問題,我們可以先從 Morris traversal 開始看起。 Morris traversal 核心精神 : 以 leaf node 作為回到 root 的入口 以往我們在進行 binary tree 的 traversal 時,我們之所以需要用到 recursion 或是 stack/queue 的輔助是因為我們需要有一個方法可以在進入 child node 之後,回到原本的 parent node 。
     Like 3 Bookmark
  • 本次期末專題的題目為嘗試在 pynq-z2 上實做出簡單的 single head attentation 的運算加速器。 Back ground 詳細的運算過程可參考李弘毅教授的 講解 或這篇包含詳細計算過程的範例 文章 ,本文只簡單列出計算過程公式以便分析系統所需功能。 single head attentation 運算方式如下: $x^i$ is input sequnce (word) $\alpha^i = Wx^i$ (embed any sequence $x^i$ into fixed len vector $\alpha^i$) $q^i = W^q \alpha^i$
     Like  Bookmark
  • contributed by < fennecJ > 測驗 1 uint64_t next_pow2(uint64_t x) { x |= x >> 1; x |= x >> 1; x |= x >> 1; x |= x >> 1; x |= x >> 1;
     Like  Bookmark
  • contributed by < fennecJ > 開發環境 $ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ lscpu
     Like  Bookmark
  • 概述: 本專題為參加新思科技 2022 之 AIoT 應用比賽[^3],期間為(2022/03/03~2022/07/22) 成果:取得「企業贊助獎,獎金共三萬元」 - 所有得獎作品連結、本隊得獎作品連結 demo影片連結 作品說明及程式碼 指導教授: 成大電機系 陳中和教授,計算機架構與系統實驗室主持人 組員:
     Like  Bookmark
  • 要印出 Binary tree 只要用 preorder postorder 或是 inorder 尋訪每個 node 就能夠把裡面的資料都印出來了,但那樣印出來的資料是1維的,很難直觀的看出每個 node 之間的連結。本文主要探討要如何以2維的方式印出一個binary tree,先上結果圖。 先把 code 放上來 void print_tab(int i) { for (int j = 0; j < i; j++) printf("|\t"); } void print_tree(node_t *root, int i) { if (root == NULL)
     Like  Bookmark
  • contributed by < fennecJ > 題目連結 2020q3 第 3 週測驗題 測驗 1 int asr_i(signed int m, unsigned int n) { const int logical = (((int) -1) OP1) > 0;
     Like  Bookmark
  • contributed by < fennecJ > 2020q3 第 2 週測驗題 索引 [TOC] 測驗1 #include <stdbool.h> #include <stddef.h>
     Like  Bookmark
  • contributed by < fennecJ > 作業說明 索引 [TOC] 環境 $ uname -a Linux fennecj-Z-Series 5.4.0-47-generic #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
     Like  Bookmark
  • contributed by < fennecJ > 2020q3 第 1 週測驗題 第一題 (AA1) void add_entry(node_t **head, int new_value) { node_t **indirect = head; node_t *new_node = malloc(sizeof(node_t));
     Like  Bookmark