Comments (5)
README 第2.2节
错别字:
threadIdx:thread在所在block中的为欧洲索引
为欧洲索引是不是本来想写位置索引
勘误:
这两个公式是不是写错了?
那么,任意一个thread在block中的编号为threadIdx.y * blockDim.x + blockDim.x。
和 > 同理,任意一个block在grid中的编号为blockIdx.y * gridDim.x + gridDim.x。
,这两个公式相加的项是不是分别想写 thread.x 和 block.x 。
最后总结的公式倒是没问题 (苦笑)
那么,任意一个thread在block中的编号为threadIdx.y * blockDim.x + blockDim.x。
同理,任意一个block在grid中的编号为blockIdx.y * gridDim.x + gridDim.x。
任意一个thread在grid中处在blockIdx.x * gridDim.x + threadIdx.x行、blockIdx.y * gridDim.y + threadIdx.y列的位置。
任意一个thread在grid中标号为(blockIdx.x + blockIdx.y * gridDim.x) * (blockDim.x * blockDim.y) + (threadIdx.y * blockDim.x) + threadIdx.x
from cuda_with_pytorch.
任意一个thread在grid中的位置是不是也写错了?
thread在grid中的x索引 = blockIdx.x * blockDim.x + threadIdx.x
thread在grid中的y索引 = blockIdx.y * blockDim.y + threadIdx.y
我感觉是这样啊
from cuda_with_pytorch.
时间太久了,不记的了 :(
from cuda_with_pytorch.
时间太久了,不记的了 :(
寄
from cuda_with_pytorch.
小问题吧,跑一遍代码,啥都有了
from cuda_with_pytorch.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cuda_with_pytorch.