- 博客(38)
- 资源 (12)
- 收藏
- 关注
原创 SPH fluid simulation methods & source codes (cpu & gpu)
这篇文章主要源于我在知乎上回到的一个问题 请教一篇siggraph上比较好实现的流体模拟论文? 关于 Fluid Simulation,本文主要介绍使用基于 SPH 的方法模拟水的 Siggraph 论文,这类基于 SPH 的方法代码量不大,实现比较容易。(1) Siggraph 09' 有篇基于 SPH 的文章 “Predictive-corrective incompres
2015-06-09 18:40:19
2920
转载 BVH with SAH (Bounding Volume Hierarchy with Surface Area Heuristic)
BVH with SAH see Physically Based Rendering (2nd edition) CHAPTER 04. PRIMITIVES AND INTERSECTION ACCELERATION - Bounding Volume Hierarchies
2015-05-02 16:31:35
1713
原创 简单多面体(三角形网格表示)的惯性张量求解
参考资料:1. Fast and accurate computation of polyhedral mass properties2. Polyhedral Mass Properties (Revisited) (重要,有伪代码)
2014-11-27 12:22:05
1273
原创 Windows 7 (64bit) + visual studio 2010 + cygwin + PBRT(version 2)编译
源码地址(github): Physically Based Rendering: From Theory to Implementation (2nd version)
2014-11-12 11:16:38
1563
原创 一个非常好用的visual studio 代码对齐插件 Code alignment
Code alignmenthttp://www.codealignment.com/download link:http://visualstudiogallery.msdn.microsoft.com/7179e851-a263-44b7-a177-1d31e33c84fd/
2014-10-05 15:47:11
19776
原创 笔试面试内容收集
如果编写一个标准strcpy函数的总分值为10,下面给出几个不同得分的答案: 2分void strcpy( char *strDest, char *strSrc ) { while( (*strDest++ = * strSrc++) != ‘\0’ ); } 4分 void s
2014-09-05 13:35:34
497
原创 CUDA Performance Tips
Tips:1. CUDA memory for lookup tables:It may be best not to use any tables on the GPU at all (see also CUDA math library), as FLOPS are increasing faster than memory bandwidth across GPU generat
2014-01-08 14:22:08
666
原创 CUDA dynamic parallelism在 visual studio 2010 中的设置
1. 工程->属性->CUDA C/C++ -> Common -> Generate Relocatable Device Code 设置为是 (-rdc=true)2. 工程->属性->CUDA C/C++ -> Device -> Code Generation设置为compute_35,sm_353. 工程->属性->链接器->输入->附加依赖项->cudadevrt.lib
2013-09-09 22:50:29
1502
原创 CUDA Dynamic Parallelism 学习笔记
1. 循环的并行化:(1)循环固定(2)内循环依赖于外循环without dynamic parallelism
2013-07-29 22:28:13
2062
原创 GPU快速排序笔记
利用CUDA 5.0最新推出的 Dynamic Parallelism,以往很难使用的分治法现在可以轻易的在GK110上利用这一新特性实现,非常方便:算法思想:随机选取一个枢纽元(pivot),对排序数组进行划分,左边一组都比枢纽元小,右边一组都等于或大于枢纽元,然后对每一个分组递归使用快排算法直至每一个分组仅有一个元素,则排序完成。示例图:CUDA version wit
2013-07-29 21:57:26
3797
转载 面向对象vs面向数据
http://blog.youkuaiyun.com/xoyojank/article/details/8739957要点摘录: SIMD, Cache friendly其实大多数做引擎的人都有考虑, 好多人都会说"SSE我很熟"我去, 看看他们写的代码, 连数据结构内存都没对齐, 还好意思说"SSE我很熟"......另外, 尽量把相同类型的数据存放在连续的内存空间里, 并且
2013-07-26 14:07:28
766
原创 CUDA Optimization tips
摘自 "CUDA C Best Practices"1. To maximize developer productivity, profile the application to determine hotspots and bottlenecks2. To get the maximum benefit from CUDA, focus first on finding ways t
2013-07-26 10:35:33
790
原创 Incrementally parallelizing the existing code
Assess, Parallelize, Optimize, DeployStep 1: Profiling the code in order to identify the hot spots.Strong scaling (Amdahl's Law) is a measure of how, for a given problem size, perfor
2013-07-24 05:27:26
673
原创 计数排序笔记
基本思想:【摘自算法导论第三版P108】对每一个输入元素x,确定小于x的元素的个数。利用这一信息,就可以直接把x放到它在输出数组中的位置上了。serial code for sorting an array of 8-bit unsigned numbers:void CountingSort( unsigned char* a, unsigned long a_size ){
2013-07-18 13:48:14
650
原创 LINK : fatal error LNK1104: 无法打开文件“LIBC.lib”
将老版本的VC开发的项目,用新版本VC开发环境上去编译,链接时也许会触发LNK1104错误。解决方案是链接时忽略特定默认库:项目->属性->配置属性->连接器->输入->忽略特定默认库->输入LIBC.lib
2013-07-01 17:56:13
1109
原创 visual studio 2010 添加CUDA C 关键字高亮 & IntelliSense support
1.打开visual studio 2010, 依次选择:工具->选项->项目和解决方案->VC++项目设置,在要包括的扩展名中添加.cu2.右键点击项目名,打开项目属性页,将配置选为“所有配置”(对debug&release都有效),然后选择:配置属性->VC++目录,在包含目录中添加$(CUDA_INC_PATH)3.在用户自定义列表中添加CUDA关键词:如果用的win 7
2013-05-23 05:04:13
1532
原创 OpenGL程序中与glew相关的未处理异常的解决方案
问题:程序中已经正确包含glew相关的头文件和库文件,glew也已经通过glewInit()正确初始化,程序运行到glGenVertexArrays处时仍然出现运行时错误:***.exe(某opengl可执行程序)中的0x********(某内存地址) 处有未处理的异常: Ox********: Access violation解决方案: 在glewInit()之前加上glewExpe
2013-05-08 00:28:06
1735
原创 函数名之对仗词使用
From 《代码大全2》 7.3节add/removeincrement/decrementopen/closebegin/endinsert/deleteshow/hidecreate/destroylock/unlocksource/target
2013-04-15 17:00:32
728
原创 《重构--改善既有代码的设计》读书笔记之五:运用多态取代条件逻辑(if/else , switch)
先阅读完《大话设计模式》&《设计模式--可复用面向对象软件的基础》中有关State模式的章节,对状态模式有个较为深入的了解,然后继续《重构》中1.4节利用State模式表现不同影片的价格状态。步骤1:运用Replace Type Code with State/Strategy,将与类型相关的行为搬移至State模式内步骤2:运用Move Method将switch语句搬移
2013-04-08 18:42:11
1413
原创 《重构--改善既有代码的设计》读书笔记之四:将条件分支语句放入合适类中
要点:最好不要在另一个对象的属性基础上运用条件分支语句,如果不得不使用,也应该在对象自己的数据上使用。方法:getCharge() 和 getFrequentRenterPoints()移动到Movie类中去。在运用继承重构代码之前 rental & movie 代码如下:rental.h:#ifndef RENTAL_H#define RENTAL_H#include
2013-04-08 12:41:59
674
原创 《重构--改善既有代码的设计》读书笔记之三:分解并重组statement() part2
运用Replace Temp with Query把statement()中的totalAmount 和 frequentRenterPoints临时变量去掉:用Customer类的getTotalCharge()取代totalAmount用Customer类的getTotalFrequentRenterPoints()取代frequentRenterPoints最后,我们
2013-04-08 01:01:54
845
原创 《重构--改善既有代码的设计》读书笔记之二:分解并重组statement() part1
病症:statement()这样一个长长的函数很明显需要进行重构。要点:代码块越小,代码的功能就越容易管理,代码的处理和移动也就越轻松。步骤1:找出代码的逻辑泥团switch语句,运用Extract Method将其提炼到独立函数中。首先在代码段里找出函数内的局部变量和参数,注意哪些被修改过(如:thisAmount),哪些没有被修改过(如:each)。任何不会被修改的变量
2013-04-07 23:03:13
697
原创 《重构--改善既有代码的设计》读书笔记之一:起始代码之C++ Version
为了更好地理解《重构》一书中的思想,将其代码用C++形式表现出来并结合书本内容逐步重构。movie.h:#ifndef MOVIE_H#define MOVIE_H#include using std::string;class Movie{public: Movie(string title = "empty", int priceCode = 0);
2013-04-07 19:41:38
1291
原创 Visual Studio 2010 User-Defined Macros
http://msdn.microsoft.com/en-us/library/f2t8ztwy.aspx
2012-07-24 11:41:32
438
原创 CUDA学习笔记
1. About page-locked host memory / pinned memory:(1) Restrict their use to memory that will be used as a source/destination in calls to cudaMemcpy() and freeing them when they are no longer needed
2012-04-26 07:46:19
567
原创 Physics-Based Animation learning notes
1. List of physics engines and reference material:http://www.gamedev.net/topic/475753-list-of-physics-engines-and-reference-material-updated-7-march-2011/ 2. Physics engine list, books,
2012-03-16 21:15:33
2045
1
原创 Some C++ notes
2.27:关于最小化编译依存关系(from "effective c++ (3rd)") Pimple idiom思想:将接口与实现相分离,以“声明依存性”替换“定义依存性”手段:句柄类(Handle class) & 接口类(Interface class)Pros:降低文件间的编译依存关系,进而缩短改动后的编译时间。Cons: 会牺牲一点速度和消耗多一点内存(1) 不该
2012-02-27 21:04:46
503
转载 [link]Useful Libraries
[1] A C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms:http://eigen.tuxfamily.org/index.php?title=Main_Page[2] A portable C++ templated library
2012-02-27 18:06:58
394
转载 [Link]Google C++ Style Guide
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
2012-02-27 17:56:55
430
转载 Multi-Core CPU articles
Scalable Multithreaded Programming with Thread Pools http://msdn.microsoft.com/en-us/magazine/gg232758.aspx
2011-10-27 07:04:03
401
原创 My physically based simulation book list(To be continued)
Here is the list of the maths and physics books that I might read in the future (no time for rendering books):Maths and Physics:
2011-09-13 00:06:34
518
原创 Start game physics reading, just for fun
Already Got tired and bored of research. Physically based animation, interesting but not that attractive in terms of research. Paper read
2011-09-09 22:49:24
426
原创 《数据结构与算法分析--C++描述》(第三版)学习笔记系列一:BST的实现
实现代码:"BST.h": #ifndef __BST_H__#define __BST_H__#include using namespace std;//*********BST类的接口****************//void insert(x) 插入//void remove(x) 删除//bool contai
2009-10-04 17:18:00
1045
Computer Graphics: Principles and Practice (3rd Edition) 高清版
2014-02-24
The CUDA Handbook: A Comprehensive Guide to GPU Programming
2013-09-05
Fundamentals of Computer Graphics (3rd Edition)
2013-05-08
UltraMon 3.2.2 安装程序&注册码(For 32-bit/64-bit Windows 8/7/Vista/XP)
2013-04-11
Fundamentals of computer graphics 2 Ed(含DJVU阅读器)
2009-11-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人