于是作为调剂,弄了一套BOSE Companion 20到研究室去,听音乐的音质好一点干事都要心情顺畅一点~当然了,研究室里面有其他人的时候开音箱只是噪音扰民,所以有人的时候都是把音箱当放大器接耳机听,而到了晚上没其他人一个人霸占研究室的时候就可以心安理得地开音箱了XD
然后虽然当初订电脑的时候并没有订触控板,8过教授突然问有没有人想要触控板的——于是作为键盘鼠标触控板三刀流的咱自然举手了——用触控板玩Mission Control的快感,乃们这些Windows党自然不会懂(殴),于是教授把他原来那块触控板那给偶,自己订了一台新的27寸iMac再弄了一块触控板过来wwwwww
话说最近在研究室方面最大的成就就是成功搞定了Bitonic Sort——一个用于并行计算的排序方式w大家知道排序通常像CPU这样的单线程排序的话算法很好解决,而且现在已经有很多种算法了;但问题是那些算法都并不适合用在GPU这样的并行计算上,所以为了能让GPU更快地排序咱是查了好多的资料甚至想过直接引用Library,8过最后还是将目光锁定在了这个Bitonic Sort的排序算法上——有兴趣的童鞋欢迎围观wiki上的说明(英文),嘛光是为了搞懂这货到底是怎么运作的咱就花了两天的时间,然后又花了两天的时间才最终把代码写出来ww这货真麻烦w有兴趣的童鞋欢迎围观下面的代码(语言为CUDA,每个Block使用1024个Thread排序4096个项目,其中R是项目值,R_posX和R_posY则分别是该值的X坐标和Y坐标;正如同上篇文章所说代码内大量试用了bit运算符和特别是shift运算符),当然如果你有更快的解决办法也欢迎提出来哦~(顺便一说——其实上面的照片里面iMac下面的那张草稿纸正是关于这个Bitonic Sort的草稿,当然这只是其中一张而已w)
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | <span class = "pln" >__device__ </span><span class = "kwd" > void </span><span class = "pln" > bitonicSort</span><span class = "pun" >(</span><span class = "kwd" > float </span><span class = "pln" > </span><span class = "pun" >*</span><span class = "pln" >R</span><span class = "pun" >,</span><span class = "pln" > </span><span class = "kwd" > char </span><span class = "pln" > </span><span class = "pun" >*</span><span class = "pln" >R_posX</span><span class = "pun" >,</span><span class = "pln" > </span><span class = "kwd" > char </span><span class = "pln" > </span><span class = "pun" >*</span><span class = "pln" >R_posY</span><span class = "pun" >)</span><span class = "pln" > </span><span class = "pun" >{</span><span class = "pln" > </span><span class = "kwd" > int </span><span class = "pln" > i</span><span class = "pun" >,</span><span class = "pln" > j</span><span class = "pun" >,</span><span class = "pln" > k</span><span class = "pun" >,</span><span class = "pln" > frac</span><span class = "pun" >,</span><span class = "pln" > xtemp</span><span class = "pun" >,</span><span class = "pln" > x</span><span class = "pun" >,</span><span class = "pln" > </span><span class = "kwd" >group</span><span class = "pun" >,</span><span class = "pln" > el0</span><span class = "pun" >,</span><span class = "pln" > el1</span><span class = "pun" >;</span><span class = "pln" > </span><span class = "kwd" > for </span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >i </span><span class = "pun" >=</span><span class = "pln" > </span><span class = "lit" >0</span><span class = "pun" >;</span><span class = "pln" > </span><span class = "lit" >1</span><span class = "pln" > </span><span class = "pun" ><<</span><span class = "pln" > i </span><span class = "pun" ><=</span><span class = "pln" > </span><span class = "lit" >2048</span><span class = "pun" >;</span><span class = "pln" > i</span><span class = "pun" >++)</span><span class = "pln" > </span><span class = "pun" >{</span><span class = "pln" > </span><span class = "kwd" > for </span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >j </span><span class = "pun" >=</span><span class = "pln" > i</span><span class = "pun" >;</span><span class = "pln" > j </span><span class = "pun" >>=</span><span class = "pln" > </span><span class = "lit" >0</span><span class = "pun" >;</span><span class = "pln" > j</span><span class = "pun" >--)</span><span class = "pln" > </span><span class = "pun" >{</span><span class = "pln" > </span><span class = "kwd" > if </span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >j </span><span class = "pun" >==</span><span class = "pln" > i</span><span class = "pun" >)</span><span class = "pln" > </span><span class = "pun" >{</span><span class = "pln" > </span><span class = "kwd" > for </span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >k </span><span class = "pun" >=</span><span class = "pln" > threadIdx</span><span class = "pun" >.</span><span class = "pln" >y </span><span class = "pun" >*</span><span class = "pln" > blockDim</span><span class = "pun" >.</span><span class = "pln" >x </span><span class = "pun" >+</span><span class = "pln" > threadIdx</span><span class = "pun" >.</span><span class = "pln" >x</span><span class = "pun" >;</span><span class = "pln" > k </span><span class = "pun" ><</span><span class = "pln" > </span><span class = "lit" >2048</span><span class = "pun" >;</span><span class = "pln" > k </span><span class = "pun" >+=</span><span class = "pln" > blockDim</span><span class = "pun" >.</span><span class = "pln" >x </span><span class = "pun" >*</span><span class = "pln" > blockDim</span><span class = "pun" >.</span><span class = "pln" >y</span><span class = "pun" >)</span><span class = "pln" > </span><span class = "pun" >{</span><span class = "pln" > frac </span><span class = "pun" >=</span><span class = "pln" > </span><span class = "pun" >(</span><span class = "lit" >1</span><span class = "pln" > </span><span class = "pun" ><<</span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >j </span><span class = "pun" >+</span><span class = "pln" > </span><span class = "lit" >1</span><span class = "pun" >))</span><span class = "pln" > </span><span class = "pun" >-</span><span class = "pln" > </span><span class = "lit" >1</span><span class = "pun" >;</span><span class = "pln" > xtemp </span><span class = "pun" >=</span><span class = "pln" > k </span><span class = "pun" >>></span><span class = "pln" > j</span><span class = "pun" >;</span><span class = "pln" > x </span><span class = "pun" >=</span><span class = "pln" > xtemp </span><span class = "pun" ><<</span><span class = "pln" > j</span><span class = "pun" >;</span><span class = "pln" > </span><span class = "kwd" >group</span><span class = "pln" > </span><span class = "pun" >=</span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >x </span><span class = "pun" ><<</span><span class = "pln" > </span><span class = "lit" >2</span><span class = "pun" >)</span><span class = "pln" > </span><span class = "pun" >+</span><span class = "pln" > frac</span><span class = "pun" >;</span><span class = "pln" > el0 </span><span class = "pun" >=</span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >x </span><span class = "pun" ><<</span><span class = "pln" > </span><span class = "lit" >1</span><span class = "pun" >)</span><span class = "pln" > </span><span class = "pun" >+</span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >k </span><span class = "pun" >&</span><span class = "pln" > </span><span class = "pun" >((</span><span class = "lit" >1</span><span class = "pln" > </span><span class = "pun" ><<</span><span class = "pln" > j</span><span class = "pun" >)</span><span class = "pln" > </span><span class = "pun" >-</span><span class = "pln" > </span><span class = "lit" >1</span><span class = "pun" >));</span><span class = "pln" > el1 </span><span class = "pun" >=</span><span class = "pln" > </span><span class = "kwd" >group</span><span class = "pln" > </span><span class = "pun" >-</span><span class = "pln" > el0</span><span class = "pun" >;</span><span class = "pln" > </span><span class = "kwd" > if </span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >R</span><span class = "pun" >[</span><span class = "pln" >el0</span><span class = "pun" >]</span><span class = "pln" > </span><span class = "pun" ><</span><span class = "pln" > R</span><span class = "pun" >[</span><span class = "pln" >el1</span><span class = "pun" >])</span><span class = "pln" > </span><span class = "pun" >{</span><span class = "pln" > swapFloat</span><span class = "pun" >(&</span><span class = "pln" >R</span><span class = "pun" >[</span><span class = "pln" >el0</span><span class = "pun" >],</span><span class = "pln" > </span><span class = "pun" >&</span><span class = "pln" >R</span><span class = "pun" >[</span><span class = "pln" >el1</span><span class = "pun" >]);</span><span class = "pln" > swapChar</span><span class = "pun" >(&</span><span class = "pln" >R_posX</span><span class = "pun" >[</span><span class = "pln" >el0</span><span class = "pun" >],</span><span class = "pln" > </span><span class = "pun" >&</span><span class = "pln" >R_posX</span><span class = "pun" >[</span><span class = "pln" >el1</span><span class = "pun" >]);</span><span class = "pln" > swapChar</span><span class = "pun" >(&</span><span class = "pln" >R_posY</span><span class = "pun" >[</span><span class = "pln" >el0</span><span class = "pun" >],</span><span class = "pln" > </span><span class = "pun" >&</span><span class = "pln" >R_posY</span><span class = "pun" >[</span><span class = "pln" >el1</span><span class = "pun" >]);</span><span class = "pln" > </span><span class = "pun" >}</span><span class = "pln" > </span><span class = "pun" >}</span><span class = "pln" > </span><span class = "pun" >}</span><span class = "pln" > </span><span class = "kwd" > else </span><span class = "pln" > </span><span class = "pun" >{</span><span class = "pln" > </span><span class = "kwd" > for </span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >k </span><span class = "pun" >=</span><span class = "pln" > threadIdx</span><span class = "pun" >.</span><span class = "pln" >y </span><span class = "pun" >*</span><span class = "pln" > blockDim</span><span class = "pun" >.</span><span class = "pln" >x </span><span class = "pun" >+</span><span class = "pln" > threadIdx</span><span class = "pun" >.</span><span class = "pln" >x</span><span class = "pun" >;</span><span class = "pln" > k </span><span class = "pun" ><</span><span class = "pln" > </span><span class = "lit" >2048</span><span class = "pun" >;</span><span class = "pln" > k </span><span class = "pun" >+=</span><span class = "pln" > blockDim</span><span class = "pun" >.</span><span class = "pln" >x </span><span class = "pun" >*</span><span class = "pln" > blockDim</span><span class = "pun" >.</span><span class = "pln" >y</span><span class = "pun" >)</span><span class = "pln" > </span><span class = "pun" >{</span><span class = "pln" > xtemp </span><span class = "pun" >=</span><span class = "pln" > k </span><span class = "pun" >>></span><span class = "pln" > j</span><span class = "pun" >;</span><span class = "pln" > x </span><span class = "pun" >=</span><span class = "pln" > xtemp </span><span class = "pun" ><<</span><span class = "pln" > j</span><span class = "pun" >;</span><span class = "pln" > el0 </span><span class = "pun" >=</span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >x </span><span class = "pun" ><<</span><span class = "pln" > </span><span class = "lit" >1</span><span class = "pun" >)</span><span class = "pln" > </span><span class = "pun" >+</span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >k </span><span class = "pun" >&</span><span class = "pln" > </span><span class = "pun" >((</span><span class = "lit" >1</span><span class = "pln" > </span><span class = "pun" ><<</span><span class = "pln" > j</span><span class = "pun" >)</span><span class = "pln" > </span><span class = "pun" >-</span><span class = "pln" > </span><span class = "lit" >1</span><span class = "pun" >));</span><span class = "pln" > el1 </span><span class = "pun" >=</span><span class = "pln" > el0 </span><span class = "pun" >+</span><span class = "pln" > </span><span class = "pun" >(</span><span class = "lit" >1</span><span class = "pln" > </span><span class = "pun" ><<</span><span class = "pln" > j</span><span class = "pun" >);</span><span class = "pln" > </span><span class = "kwd" > if </span><span class = "pln" > </span><span class = "pun" >(</span><span class = "pln" >R</span><span class = "pun" >[</span><span class = "pln" >el0</span><span class = "pun" >]</span><span class = "pln" > </span><span class = "pun" ><</span><span class = "pln" > R</span><span class = "pun" >[</span><span class = "pln" >el1</span><span class = "pun" >])</span><span class = "pln" > </span><span class = "pun" >{</span><span class = "pln" > swapFloat</span><span class = "pun" >(&</span><span class = "pln" >R</span><span class = "pun" >[</span><span class = "pln" >el0</span><span class = "pun" >],</span><span class = "pln" > </span><span class = "pun" >&</span><span class = "pln" >R</span><span class = "pun" >[</span><span class = "pln" >el1</span><span class = "pun" >]);</span><span class = "pln" > swapChar</span><span class = "pun" >(&</span><span class = "pln" >R_posX</span><span class = "pun" >[</span><span class = "pln" >el0</span><span class = "pun" >],</span><span class = "pln" > </span><span class = "pun" >&</span><span class = "pln" >R_posX</span><span class = "pun" >[</span><span class = "pln" >el1</span><span class = "pun" >]);</span><span class = "pln" > swapChar</span><span class = "pun" >(&</span><span class = "pln" >R_posY</span><span class = "pun" >[</span><span class = "pln" >el0</span><span class = "pun" >],</span><span class = "pln" > </span><span class = "pun" >&</span><span class = "pln" >R_posY</span><span class = "pun" >[</span><span class = "pln" >el1</span><span class = "pun" >]);</span><span class = "pln" > </span><span class = "pun" >}</span><span class = "pln" > </span><span class = "pun" >}</span><span class = "pln" > </span><span class = "pun" >}</span><span class = "pln" > __syncthreads</span><span class = "pun" >();</span><span class = "pln" > </span><span class = "pun" >}</span><span class = "pln" > </span><span class = "pun" >}</span><span class = "pln" > </span><span class = "pun" >}</span> |
嘛Bitonic Sort解决了之后误差矢量的去除就解决了一半了,然后Sub Pixel精度也已经搞定了,于是差不多该动笔写毕业论文了w
好了研究室的事情就说到这里,话说公司附近有家中餐馆很不错的,量足味美,价格也不算特别贵——当然对于咱这种食量并不大的人来说还是更希望哪怕他量减半,只要价格也半价就好了w
传说中的氷菓米,终于在Rakuten上订了哦!现在在东京有电饭煲终于可以自己煮饭了,可惜上一袋米还没吃完,等吃完了再来品尝吃蛋挞家种的岐阜飛騨高山产こしひかり大米w
昨天星期六从东京回宇都宫的时候,本来是跟另外一个朋友约好见面的,结果那个朋友感冒还没好没法出门,然后另外又从国内来了两个朋友,而且居然正好和偶在东京的几个朋友又都在秋叶原,于是好吧很偶然的一群死宅们就这样聚在一起了——图为某WS大叔,阿不,是妹子(生理上)在秋叶原Gamers本店1楼对Supersonico的抱枕实施性侵犯,啊不,是亲密身体接触的瞬间w
然后咱在とらのあな也正好看到了新发售的这货——毫不犹豫入手w
以上,估计这样的繁忙日子还将继续持续一段时间w
p.s. 终于把研究室的iMac的桌面换掉了——女仆本的壁纸图集太大了而且有不少比iMac的分辨率要低的,所以懒得换图集了,干脆只换了一张单张——CiCi老师画的吃蛋挞
再p.s. WordPress 3.5终于插入图片比原来方便点了……w
目测能抢个沙发- –
话说啥时候能出个朱音想要的角色的带欧派的抱枕… 顺便最好不要是枕芯限定的那种… 再不出朱音都要毕业了…
有新iMac真好~

并行计算什么的…日常真心很少用上,以前xcode2~3的时候还能进行分布编译,到了4之后直接去掉了这功能,而且Lion之后也没Xgrid了。不过电脑性能高的话也没必要这些就是~
乃们教授很强力

咱进入考试周了,自然也是各种忙碌啊
@conanshang
偶虽然不是考试8过各种事情堆在一起忙啊
@bi119aTe5hXk
问题不是在于性能高低的问题而是在于单线程排序不知道要排到哪年的问题
@白銀朱音
毕业之后也可以买啊
@星野恵瑠
不过多线程麻烦好多…
原来是指多线程啊…
嘛确实单线程的话超蛋疼的~
就和同步异步那样,对于咱这种喜欢偷懒的人来说只要是不严重影响体验的情况一般是不会使用异步的…
刚连续在研究室呆了60个钟头的人也来蹭一脚。。(教授突发奇想,要咱们用东方角色制作宣传科学知识的动画。。。完全专业范围外于是各种效率低下啊啊啊。。稀里糊涂地通宵达旦着)
BOSE什么的。。在研究室一直用着的音箱是buffalo> <。。。深更半夜在研究室听ラジオ算是能听个响
ps.看见peko眼睛一亮+w+
kao.好邪恶的妹子啊!
@星野恵瑠

话说乃明年就要开始工作了对么?
那时候会更忙么?
话说我玩过wacom的触摸板在windows上面~~~
我在Google阅读器看到了自动显示了最邪恶的那张图,谷歌果然合我口味23333
麻婆豆腐
青椒肉絲 

K+: 吾輩壁紙是兩幅百合圖
妹子好邪恶 XD
立体抱枕各种赞wwwww

不过穷人买不起了
沉甸甸的手感想必很舒服吧,嘿嘿。这个墙纸真不错啊,又震撼,又不是太花哨,好想要个新显示器呀
我的壁纸现在是win7和win8的默认壁纸,实在是没兴趣换新的了。
看来看去还是默认的舒服,这是肿么了。
被右下角的妹子吓尿了
@Czzoo
不至于吧
@Jacse
嘛偶Windows上也是“近乎于”默认壁纸
@Leyeang
感觉已经被摸得太脏了
不知道偶没去摸
@Decmes
买不起+1好羡慕那些一天就预约4个游戏的壕夶啊
@Gulf Howe
@TTkea
这年头妹子比怪叔叔还怪叔叔
@kita
女仆本上的话百合壁纸一大堆
@龙龙Fred
Windows木有Mission Control根本木有太大意思啊
@conanshang
肯定会的
@SimpleMe
你们教授原来是东方厨么
peko大美啊
@bi119aTe5hXk
偶写的很清楚了1024个thread了吧
那只抓东西的爪子亮瞎了!
@呒喵
噗
万年黑背景的好无力
擦,最后一张壁纸不错快分享给我!
然后快介绍那只抓着胸部的萌妹子给我认识!
@小明猪
壁纸偶不是给了Pixiv的链接么
@卜卜口の
域名和名称已经换了有一段时间了哦
@星野恵瑠 摔,那萌妹子的链接呢!
变态!
有张图片吓到我了
@天羽
↑警察蜀黍就是这个人
@小明猪
欢迎搜索咱的Twitter
测试twitter~
晒萌妹子的照片啊
亲密接触哦
@秦大少
www木有妹子的照片
对麻婆豆腐感兴趣,嗯,爱吃豆腐
好……设计好棒的抱枕……手感怎么样。
@luacloud
不知道,偶没摸
冰果米味道如何呢w
wp3.5因为我的主机问题只能手动升级好痛苦……
你才WS大叔你全家都WS大叔
@柚子
噗
@独星
很不错哦