在未来的硬件上编程?

发布于 2024-07-21 08:45:49 字数 221 浏览 8 评论 0 原文

我想练习未来硬件的编程代码。 这些是什么? 我想到的两个主要问题是 64 位和多核。 我还注意到缓存很重要,GPU 有自己的技术,但现在我对任何图形编程都不感兴趣。

我还应该了解什么?

-编辑-我知道目前有很多这样的东西,但很快所有CPU都将是多核的,线程将变得更加重要。 我考虑了字节序(大字节序和小字节序),但发现这并不重要,并且已经有一个大字节序 CPU 可供测试。

I want to practice programming code for future hardware. What are these? The two main things that come to mind is 64bits and multicore. I also note that cache is important along and GPU have their own tech but right now i am not interested in any graphics programming.

What else should i know about?

-edit- i know a lot of these are in the present but pretty soon all cpus will be multicore and threading will be more important. I consider endians (big vs little) but found that not to be important and already have a big endian CPU to test on.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

最丧也最甜 2024-07-28 08:45:50

学习 OpenCL 怎么样? 它是一种基于 C 的大规模并行处理语言。它类似于 nVidia 的 CUDA,但与供应商无关。 目前还没有重大的实施,但预计很快就会看到一些实施。

至于64位的,不用太担心。 除非您正在做非常低级的事情(内核),否则编程实际上不会有任何不同。 Java 和 .NET 等更高级别的框架允许您在 32 位和 64 位计算机上运行代码。 即使 C/C++ 也允许您这样做(但不是那么透明)。

How about learning OpenCL? It's a massively parallel processing language based on C. It's similar to nVidia's CUDA but is vendor agnostic. There are no major implementations yet, but expect to see some pretty soon.

As for 64 bit, don't really worry about. Programming will not really be any different unless you're doing really low level stuff (kernels). Higher level frameworks such as Java and .NET allow you to run code on 32 bit and 64 bit machines. Even C/C++ allows you to do this (but not quite so transparently).

遥远的绿洲 2024-07-28 08:45:50

我同意 Oli 的回答 (+1),并补充说,除了 64 位环境之外,您还需要考虑多核环境。 该行业已接近原始速度改进周期的结束。 但我们看到越来越多的多核 CPU。 因此,并行或并发编程——这是非常困难的——很快就会变得非常受欢迎。

您如何为此做好准备并进行实践? 我一直在问自己同样的问题。 因此,在我看来,它就像函数式语言,例如 MLHaskell, LISP, ArcScheme 等是一个很好的起点,因为真正的函数式语言通常没有副作用,因此非常“可并行”。 Erlang 是另一种有趣的语言。

我发现的其他有趣的发展包括

  • 奇点 研究操作系统
  • 事务内存和软件隔离进程
  • 许多关于并发的软件工程播客节目。 (这是第一个。 )
  • 本文来自 ACM Queue,内容为“真实世界并发

I agree with Oli's answere (+1) and would add that in addition to 64-bit environments, you look at multi-core environments. The industry is getting pretty close to the end of the cycle of improvements in raw speed. But we're seeing more and more multi-core CPUs. So parallel or concurrent programming -- which is rilly rilly hard -- is quickly becoming very much in demand.

How can you prepare for this and practice it? I've been asking myself the same same question. So for, it seems to me like functional languages such as ML, Haskell, LISP, Arc, Scheme, etc. are a good place to begin, since truly functional languages are generally free of side effects and therefore very "parallelizable". Erlang is another interesting language.

Other interesting developments that I've found include

慕烟庭风 2024-07-28 08:45:50

当然这个问题很难回答,因为没有人知道未来的硬件会是什么样子(至少从长远来看),但多线程/并行编程很重要,并且在未来几年肯定会更加重要。

我还建议使用 CUDA/Stream 等 GPU 计算,但这可能是一个问题,因为未来几年这很可能会发生很大变化。

Of course this question is hard to answer because nobody knows what future hardware will look like (at least in long terms), but multi-threading/parallel programming are important and will be definitely even more important for some years.

I'd also suggest working with GPU computing like CUDA/Stream, but this could be a problem because it's very likely that this will change a lot the next years.

陈年往事 2024-07-28 08:45:49

我对未来的建议:)

或者您可以专注于光线追踪。

My recommendation for future :)

Or you can focusing on ray tracing.

野稚 2024-07-28 08:45:49

如果您想深入研究具有完整 64 位支持的“主流”操作系统,我建议您开始针对 Mac OS X“Snow Leopard”(代号 10.6)的测试版进行编码。 其中一项重大增强功能是 Grand Central,它是开发人员为多核系统编码的“工具”。 Grand Central 不仅应该在核心之间分配工作负载,还应该分配给 GPU。

同样非常重要的是智能设备(例如 iPhone、Android 等)的爆炸式增长。我坚信,一些即将推出的所谓“上网本”将依赖于 Android 和 iPhone 操作系统等操作系统,因此知道如何针对它们的代码进行编码SDK,并且了解如何优化移动设备的代码非常重要(例如优化性能图形或其他电池使用情况)。

If you'd like to dive into a "mainstream" OS that has full 64 bit support, I suggest you start coding against the beta of Mac OS X "Snow Leopard" (codename for 10.6). One of the big enhancements is Grand Central, which is a "facility" for developers to code for multicore systems. Grand Central should distribute workload not only between core, but also to the GPU.

Also very important is the explosion of smart devices such as the iPhone, Android, etc. I strongly believe that some upcoming so-called "netbooks" will rely on OS such as Android and iPhone OS, and as such knowing how to code against their SDK, and knowing how to optimize code for mobile devices is very important (e.g. optimizing performance graphic or otherwise, battery usage).

月依秋水 2024-07-28 08:45:49

我无法预测未来,但需要研究的一个方面是 CELL 处理器 PS3 中使用的不是许多相同的通用核心,而是只有一个(尽管能够对称多线程)加上许多更特定用途的核心。

简单分析一下,Cell处理器可以分为四个部分:外部输入和输出结构,主处理器称为Power处理元件(PPE)(一个两路同时多线程的Power ISA v.2.03兼容核心) 、八个全功能协处理器(称为协同处理元件或 SPE)以及连接 PPE、输入/输出元件和 SPE 的专用高带宽循环数据总线(称为元件互连总线或 EIB)。

CUDAOpenCL 的相似之处在于,您将通用代码和高性能计算分离为可以在不同硬件和语言/API 上运行的单独部分。

I can't foretell the future, but one aspect to look into is something like the CELL processor used in the PS3, where instead of many identical general purpose cores, there is only one (although capable of symmetric multithreading) plus many cores that are more specific purpose.

In a simple analysis, the Cell processor can be split into four components: external input and output structures, the main processor called the Power Processing Element (PPE) (a two-way simultaneous multithreaded Power ISA v.2.03 compliant core), eight fully-functional co-processors called the Synergistic Processing Elements, or SPEs, and a specialized high-bandwidth circular data bus connecting the PPE, input/output elements and the SPEs, called the Element Interconnect Bus or EIB.

CUDA and OpenCL are similar in that you separate your general purpose code and high performance computations into separate parts that may run on different hardware and language/api.

左岸枫 2024-07-28 08:45:49

64 位和多核是现在而不是未来。

关于未来:
量子计算或类似的东西?

64 bits and multicore are the present not the future.

About the future:
Quantum computing or something like that?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文