2024-04-21から1日間の記事一覧

半導体周りのブックマーク

ネットで調べていて気になった情報のリンク。 What should be the best way to learn VLSI design?https://www.quora.com/What-should-be-the-best-way-to-learn-VLSI-designVLSI 設計を学ぶには、どのような方法がいいか? NVIDIA and Cadencehttps://www.c…

サイトアイコン(ファビコン)の設定方法

画像処理ソフトで 512x512px で作成して png で書き出す。 WordPress の「外観」→「カスタマイズ」→「サイト基本情報」でアイコンを設定、アップロードできるので書き出した画像を選択するだけで設定が可能。

std::thread のメモ書き

C++

#include <iostream> #include <thread> #include <mutex> using namespace std; void func(mutex& mtx, int* count) { int local = 0; for (int i = 0; i < 10000000; i++) { mtx.lock(); ++(*count); mtx.unlock(); } local += 1; std::cout << local << std::endl; }; int main() {</mutex></thread></iostream>…

プログラムの動作速度の計測

C++

class Timer { public: Timer(const WCHAR* pMarker) : marker(pMarker) { QueryPerformanceFrequency(&clock); QueryPerformanceCounter(&start); } ~Timer() { QueryPerformanceCounter(&finish); double t = (double)(finish.QuadPart - start.QuadPart) …

Wykobi 計算機科学ライブラリ

C++

https://www.wykobi.com/index.htmlhttps://github.com/ArashPartow/wykobi

Git の覚書

Git

ローカルの変更を取り消すgit checkout . 管理されていないファイル/フォルダを削除git clean -fd 上記2つは、続けて一緒に使ったりする。 リモートブランチを一覧表示git branch -a リモートブランチに切り替えるgit checkout remote/origin/4.27 git branc…

macOS から Github にアクセス

Git

下記コマンドを入力して SSH 接続の Key を生成する。 ssh-keygen -t rsa 途中、保存先ディレクトリや、パスフレーズを聞かれるので必要があれば適宜設定する。何も入力せずに Enter で先に進める事も可能。 /Users/name/.ssh/ に鍵が出来るので、id_rsa.pub…

C++ pixelのbilinear処理

#include <iostream> #include <vector> // ピクセルを表す構造体(RGB) struct Pixel { unsigned char r; unsigned char g; unsigned char b; }; // バイリニア補間関数 Pixel BilinearInterpolate( const Pixel& top_left, const Pixel& top_right, const Pixel& bottom_lef</vector></iostream>…

C++ condition_variable サンプルコード

#include <iostream> #include <thread> #include <mutex> #include <condition_variable> #include <chrono> std::mutex mtx; std::condition_variable cv; bool ready = false; void print_id(int id) { std::unique_lock<std::mutex> lck(mtx); while (!ready) { cv.wait(lck); } // スレッドが再開された後の処理 std::cout </std::mutex></chrono></condition_variable></mutex></thread></iostream>…