Monotouch - iOS - FPU/Thumb - xamarin.ios

My understanding of the hardware on the iPhone is that there IS an FPU. It is only enabled when NOT compiled Thumb. Is this understanding correct?
More specifically, is code compiled under MonoTouch taking advantage of the FPU?

The MonoTouch v3 AOT compiler and runtime are both compiled in armv6 mode, and take full advantage of the VFP.
As for FPU support in thumb, the original thumb instruction set, which is present on the iPhone 2G and iPhone 3G only has support for Thumb, which as you stated does not have support for accessing the VFP or NEON registers.
All of the iOS hardware since the iPhone 3GS supports Thumb2 which does have support for accessing VFP and NEON registers, and the upcoming MonoTouch v4 which will have support for limiting the output to those devices will take full advantage of this as well.

Related

Can a device driver written in or compiled to LLVM IR?

The reason i am interested is that there is an everlasting problem with linux and proprietary drivers. Why hardware vendors do not ship their drivers in LLVM IR form?
You can write Linux device drivers in user mode code. I have seen demonstrations written in Python (handy for prototyping).
Presumably your idea is that hardware vendors could ship a LLVM IR driver, and then the driver would work with x86, ARM, or anything else? Most hardware vendors are not interested in niche-markets, and only want to support their hardware on particular platforms that they have tested on.
There is very rarely any interesting IPR in a driver (although there may well be in the library on top of the driver). If vendors wanted to support multiple platforms, they could just ship C code with instructions to build, and a restrictive (or even GPL) license.

Linux - relations between graphics drivers and Mesa

When I install a nvidia proprietary driver then Nvidia OpenGL implementation is used (I don't need Mesa). Which OpenGL implementation can be used with an open source nvidia driver - Nouveau ? Does Nouveau also provide OpenGL implementation or it has to use Mesa OpenGL implementation ? Can I use nvidia drivers with Mesa OpenGL implementation ? What are possibilities ?
First things first: The open source graphics drivers, all of them, use Mesa for the front side OpenGL interface and state tracking.
Let's break this down: Theoretically a OpenGL implementation can directly talk to the hardware. This is what the NVidia and AMD proprietary drivers actually do.
But in the open source world code reuse is highly favoured. So a typical open source graphics driver looks like this:
User API frontend (OpenGL + state tracker) → abstraction layer (Gallium3D or device specific internal layer) → kernel backend.
The Mesa project actually encompasses the whole chain. The OpenGL part of Mesa, (the frontend) can attach to different abstraction layers (for example also a software rasterizer, softpipe/llvm for example). But the Mesa project is also an umbrella for the other parts: The userland graphics drivers (nouveau, radeon, intel and so on), the infrastructure that allows for userspace processes to directly talk to the graphics driver, bypassing display servers (DRI) and the kernel interface (DRM), as well the kernel modules.
A few weeks ago AMD released a new kernel module (amdgpu) that uses the DRM API, is open source and will be merged into the Linux kernel. That new kernel module is there to be used by both the proprietary AMD OpenGL drivers and the open source Mesa drivers. AMD is pushing for open source for some time now and the logical next step would be, that AMD ditches their own OpenGL frontend in favor of Mesa and providing their proprietary driver as a middle end that plug into Mesa.
Can I use nvidia drivers with Mesa OpenGL implementation ?
That depends. If you're doing indirect OpenGL over X11 then in fact you can use the Mesa libGL.so for your program, talking through the X11 server to the nvidia backend driver. However used that way libGL.so merely acts as a GLX conduit. It works the other way round as well BTW.
However since this lacks "direct GL context" capabilities you'll not be able to use OpenGL features for which no indirect opcodes have been defined; that would be anything OpenGL-3 or later, sadly. Also if your data is highly dynamic there is some significant bottleneck due to serializing the command stream (theoretically using syscalls like vmsplice most of the overhead could be alleviated, though).

Getting started with OpenCL with intel HD graphics in WIndows 7

I found this link with drivers and runtimes.
And also as per this , OpenCL codebuilder is now part of INDE/Media server Studio and these are not free (Though they come with trial version)
So my ultimate question is how to get started with OpenCL with Intel HD Graphics?
There is a starter edition of the Intel INDE suite, which is free (and is not just a trial). This contains their core OpenCL SDK. The Media Server Studio may contain some additional tools to aid OpenCL development on Intel HD Graphics, but is certainly not required in order to develop or run OpenCL programs.
You don't actually need any OpenCL SDK to get started with OpenCL development. You need a driver/runtime in order to run OpenCL programs (these are freely available, as per your first link). To develop OpenCL programs you just need the headers and a library to link against, which are both also freely available (more info in this answer).
Which programming language would you like to use? In Java you can start with a simple Java SE application and integrate the JavaCL package. You do not need any further vendor specific drivers.

Is JavaFX 2.2 going to support GPU acceleration in Linux?

I've been experimenting with JavaFX, and I've found out that as of 2.2.0.b15, it uses GPU to provide improved font rendering. This makes a big difference for me. I intend to use it for visualization and animated UI features, so I'd like to know if GPU support will be provided in Linux.
I have come accross many statements that say that JavaFX will use my GPU if it is supported, and it does, but only under Windows. I have not seen anything about hardware acceleration for graphics under Linux, so I'm curious, can I expect to have this with 2.2 release?
I believe JavaFX for Linux already supports hardware acceleration for some features based on this statement from the JavaFX 2.1 Linux Develop Preview Release Notes:
3D features are supported for Nvidia cards (proprietary drivers only).
Not entirely conclusive, as it does not explicitly mention hardware acceleration, but I think use of hardware acceleration is likely if you have the appropriate Nvidia card and driver installed. Potentially, over time, hardware acceleration support under Linux for other hardware and driver configurations may be added.

Can I run CUDA on Intel's integrated graphics processor?

I have a very simple Toshiba Laptop with i3 processor. Also, I do not have any expensive graphics card. In the display settings, I see Intel(HD) Graphics as display adapter. I am planning to learn some cuda programming. But, I am not sure, if I can do that on my laptop as it does not have any nvidia's cuda enabled GPU.
In fact, I doubt, if I even have a GPU o_o
So, I would appreciate if someone can tell me if I can do CUDA programming with the current configuration and if possible also let me know what does Intel(HD) Graphics mean?
At the present time, Intel graphics chips do not support CUDA. It is possible that, in the nearest future, these chips will support OpenCL (which is a standard that is very similar to CUDA), but this is not guaranteed and their current drivers do not support OpenCL either. (There is an Intel OpenCL SDK available, but, at the present time, it does not give you access to the GPU.)
Newest Intel processors (Sandy Bridge) have a GPU integrated into the CPU core. Your processor may be a previous-generation version, in which case "Intel(HD) graphics" is an independent chip.
Portland group have a commercial product called CUDA x86, it is hybrid compiler which creates CUDA C/ C++ code which can either run on GPU or use SIMD on CPU, this is done fully automated without any intervention for the developer. Hope this helps.
Link: http://www.pgroup.com/products/pgiworkstation.htm
If you're interested in learning a language which supports massive parallelism better go for OpenCL since you don't have an NVIDIA GPU. You can run OpenCL on Intel CPUs, but at best you can learn to program SIMDs.
Optimization on CPU and GPU are different. I really don't think you can use Intel card for GPGPU.
Intel HD Graphics is usually the on-CPU graphics chip in newer Core i3/i5/i7 processors.
As far as I know it doesn't support CUDA (which is a proprietary NVidia technology), but OpenCL is supported by NVidia, ATi and Intel.
in 2020 ZLUDA was created which provides CUDA API for Intel GPUs. It is not production ready yet though.

Resources