1 Star 0 Fork 0

xnoma / GameGems

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

This is the code that I used as the basis for my articles in the Game Programming Gems series. I wrote the following articles, both of which were included in Best of Game Programming Gems.

This code is targetted toward Visual C++ 2015, though it should also work with GCC. The master branch serves as the up-to-date version of this code. The gems_bugfix branch contains the code and projects as they were written for the Gems books, with minor bug fixes as necessary.

The Mersenne Twister code was written in a tutorial style, and is not optimized for speed. C++03 was the latest version of C++ available when this code was originally written. C++11 now includes the Mersenne Twister as one of several new random number libraries available by default.

The Lock-Free code is reasonably good, though I caution any user against using any lock-free algorithms, as that style of code is exceptionally difficult to debug, and often can perform worse than the equivalent code using locks. It is fun as a mental exercise, but often difficult for many programmers to avoid the temptation of using it in practice.

As a case-in-point, this lock-free queue does have a bug in LockFreeQueue<T>::Add(). The CAS between _pTail->pNext and nullptr isn't correct as that element isn't guaranteed to still be in the queue. I don't have a fix, and I can't reproduce the issue, though it has been reported on Xbox 360 and appears to be a bug independent of architecture.

Toby Jones (www.turbohex.com, ace.roqs.net)

空文件

简介

暂无描述 展开 收起
C++
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/xnoma/GameGems.git
git@gitee.com:xnoma/GameGems.git
xnoma
GameGems
GameGems
master

搜索帮助