Speeding up GPU copies by permuting iteration spaces, or, optimising the identity function
6 points by fanf
6 points by fanf
The traditional term for what this article calls an “LMAD” is a “dope vector”. When I was looking at the CACM version of that article I found its neighbour on the previous page also uses the term “dope vector” so it seems to have been well established by 1961 (at least in Algol circles). I guess the term went out of fashion because there was a long period when programming languages didn’t support multidimensional arrays, but only arrays-of-arrays. (Also, I keep seeing “LMAO”, rofl.)
This reminds me that I wrote an old article, Multi-dimensional array views for systems programmers, which some people found helpful at the time, e.g. Multi-dimensional strided array views in Magnum. It's just an introduction to the general idea followed by a bunch of concrete tricks and applications.
Anyway, I quickly skimmed through my article again just now, and (aside from nitpicks with the writing style) I wish I had made some explicit remarks about aliasing and immutable vs mutable array views, especially when I talk about broadcasting, sliding windows, slicing (contrasted with splitting), etc. But that's the kind of thing that is completely obvious to me now after spending some years programming in Rust. For example, the ndarray crate does represent those distinctions in the API; it has no choice if it wants to be sound.