After almost three years since the initial design document and hundreds of CLs in the meantime, the V8 Sandbox — a lightweight, in-process sandbox for V8 — has now progressed to the point where it is no longer considered an experimental security feature. Starting today, the V8 Sandbox is included in Chrome's Vulnerability Reward Program (VRP). While there are still a number of issues to resolve be
In short, it aims to help evolve C++ itself, not to be a "C++ successor." What it isn't. Cpp2 is not a successor or alternate language with its own divergent or incompatible ecosystem. For example, it does not have its own nonstandard incompatible modules/concepts/etc. that compete with the Standard C++ features; it does not replace your Standard C++ compiler or other tools; and it does not requir
This is one of those times where I got so fascinated by the idea of a thing that I forgot to ask myself whether it’s a good idea to build the thing. The idea being, transpiling JavaScript to C++ so I can compile that to whatever I need. Obligatory Jeff Goldblum. I have arrived at the conclusion that I don’t think this specific approach is worth exploring further. This made it hard to write a blog
2014/10/23 12:20 一部用語を修正しました。*1*2 前回はメモリバリアで保証できる範囲について説明しました。 今回はメモリバリアの使い方を説明します。 release/acquireバリア release と acquire はセットで使います。release は store、acquire は load で使います。あるスレッド A が release で書き込んだ値 M を別のスレッド B が load で読み取れたときに、スレッド A の M より前の全ての書き込みがスレッド B で読み取れることを保証します。このとき、M 以外の値にはバリアは不要です。 // 初期値 int data; std::atomic_int x(0); // スレッド 1 data = 100; x.store(10, std::memory_order_release); // スレッド
条件変数(condition variable)同期プリミティブにまつわる "spurious wakeup" についてメモ。 安定した対訳語が存在しないようなので、本記事ではそのまま英語表記とする*1。spurious は “偽の; 疑似; 似非” といった意味の単語であり*2、wakeup は “条件変数で待機していたスレッドがブロック解除されて実行再開する”(=寝ていたスレッドが起きる)ことを意味する。 まとめ: spurious wakeup は、「条件変数での待機(wait)処理において、何もしていないのにブロック解除される現象」を指す。ライブラリ内部実装やハードウェア/OSの都合といった、同期プリミティブの利用者から関与できない原因によって生じる。その発生頻度は特に言及されないが、一般的には低確率でしか生じないはず。 spurious wakeup に対応するため、条件変数での
もはや誰得レベルになりつつありますが、今回もメモリバリアについての話です。以前の話の続きになるので、まだの方は初回と前回のエントリを先にどうぞ。 さて、まず最初に、C++0xのatomicクラスを使った「正しく同期化されているコード」の例を挙げてみます。 struct Hoge { int foo; }; // 初期値 std::atomic p(nullptr); // Thread 1 Hoge* r1 = new Hoge(); r1->foo = 42; p.store(r1, std::memory_order_release); // Thread 2 Hoge* r2; do { r2 = p.load(std::memory_order_acquire); } while (r2 == nullptr); std::cout << r2->foo; // 42が出力されるこ
Microsoft's C++ Standard Library This is the official repository for Microsoft's implementation of the C++ Standard Library (also known as the STL), which ships as part of the MSVC toolset and the Visual Studio IDE. Our Changelog tracks which updates to this repository appear in each VS release. Our Status Chart displays our overall progress over time. Join our Discord server. What This Repo Is Us
序 本書はプログラミングの経験はあるがC++は知らない読者を対象にしたC++を学ぶための本である。本書はすでに学んだことのみを使って次の知識を説明する手法で書かれた。C++コンパイラーをC++で書く場合、C++コンパイラーのソースコードをコンパイルする最初のC++コンパイラーをどうするかというブートストラップ問題がある。本書はいわばC++における知識のブートストラップを目指した本だ。これにより読者は本を先頭から読んでいけば、まだ学んでいない概念が突如として無説明のまま使われて混乱することなく読み進むことができるだろう。 C++知識のブートストラップを意識した入門書の執筆はなかなかに難しかった。ある機能Xを教えたいが、そのためには機能Yを知っていなければならず、機能Yを理解するためには機能Zの理解が必要といった具合に、C++の機能の依存関係の解決をしなければならなかったからだ。著者自身も苦し
P0631R8 Math Constants C++20で数学定数が入ることが決まりましたね。やっと標準ライブラリの範囲で円周率を定数として使えるようになります。 ここまでの道のりですが、 constexpr (C++11) 変数テンプレート (C++14) インライン変数 (C++17) 数学定数 (C++20) とても長かったですね。 #include <iostream> #include <numbers> template <class T> T degree_to_radian(T x) { return x * std::numbers::pi_v<T> / static_cast<T>(180.0); } int main() { float y = degree_to_radian(90.0f); std::cout << y << std::endl; // 1.570
初めに サイボウズ・ラボの光成です。 DNN(deep neural network : 深層学習)といえばGPUや専用プロセッサを使うのが主流です。 しかしIntelはCPUで高速にDNNをするためのライブラリ MKL-DNN を提供しています。 MKL-DNNはIntelの最新CPUに対応したオープンソースソフトウェアなのでコードを見ると勉強になります。 ここではMKL-DNNで使われているテクニックをいくつか紹介します。 概要 MKL-DNNの紹介 Xbyakの紹介 呼び出し規約 圧縮displacement ReLU exp 内積 vpdpbusd キャッシュコントロール 想定読者 C++11とx64 CPUのアセンブリ言語の知識をある程度仮定します。 機械学習についてはその知識がなくても最適化手法が理解できるよう、最小限の説明をします。 MKL-DNNの特長 まずMKL-DNNの
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く