3 ms·
That mode is called "assembly". I use it all the time.
by stephencanon 12y ago
That mode is called "assembly". I use it all the time.
- sharpneli 12y agoI especially mentioned in the the case where assembly is not available. Examples: Shaders for graphics. OpenCL kernel language. Compute shaders. It's the difference between getting 5TFlops or 2TFlops out of your GPU.
- nkurz 12y agoIt's a very useful mode, but assuming you don't write the entire program in assembly, what's the best way you've found to integrate the assembly with the non-assembly code? Is there any Windows/Mac/Linux portable and self-contained way of doing it short of writing assembly functions in separate files and distributing NASM along with the source? Does even that work?
- J_Darnley 12y agoWhy would you distribute NASM, or any other assembler, with your own code? You list it as a requirement to build your code. Would you also distribute GCC?
- nkurz 12y agoLogically this makes fine sense, but for whatever reason, I don't think I've ever encountered a popular open source program that required a specific assembler other than 'gas' unless the entire codebase was written for that assembler. I don't think I've encountered it in academic code either. But for whatever reason I've encountered a few that distribute NASM or another assembler. I don't know exactly why this would be. I'm trying to find out. Do you have examples where requiring NASM (or another assembler) as an external dependency has worked for projects in the past? I'm sure they must exist --- I just don't know of any.
- J_Darnley 12y agoFFmpeg. It requires NASM or YASM if you don't want to cripple it by disabling the external assembly.