Beginning OpenCL tutorials? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have seen some videos and articles about how powerful OpenCL can be - and I'm hooked. The problem is there is a LOT less resources out there to help you with OpenCL then .. say OpenGL.
I am looking for some pointers to some beginning OpenCL (e.g. a Hello World tutorial) tutorials and some advanced tutorials as well when I get the hang of it.
Also - how 'cross platform' is OpenCL, how many different operating systems (e.g. Windows, Linux, iOS & Android) could I get an OpenCL program running on.
BTW: I would prefer tutorials on using OpenCL with C++ (not Java etc.) :-)
EDIT: If I were to start developing in OpenCL where would I need to go for downloads like headers & .lib files on a Windows system (On linux you just need to type sudo apt-get install opencl-dev & I think Mac OS X already has it installed?).

How 'cross platform' is OpenCL, how many different operating systems
(e.g. Windows, Linux, iOS & Android) could I get an OpenCL program
running on?
OpenCL is open standard but mostly relies on a driver that a vendor develops for a specific hardware and operating system.
To obtain drivers, c++ lib and information follow the links:
Khronos
AMD
AMD guide (beginner to relatively advanced)
Nvidia
Nvidia guide (beginner to relatively advanced) + CUDA (to learn more techniques for Nvidia GPUs)
Mac
Intel
ARM
Samsung
Qualcomm

Related

Beginning development on Mac OS using Qt [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
It would be of great help ,if some one can give me some links or some books which i can read to start developing Qt application on MAC OS using Xcode(C++).I have some experience on developing Qt applications on Windows but none on MAC.I also went through Qt documentation to understand how to integrate Qt on a MAC system but that was not enough,since i am entirely new to MAC.
So i request you all to guide me where to start learning about MAC OS and Qt.
Also what are the pre-requisites which i should be aware of to start development on MAC
First things first, have you installed Qt successfully?
Installation instructions for Qt on Mac
Next, you will want to configure Xcode
SO walkthrough for setting up up a new Xcode C++ project
SO question with some great answers about setting up Qt with Xcode
Start with a basic tutorial, to check that everything works
Qt tutorial
If you run into windowing problems, you may need to get hold of an X window manager like XQuartz. I'm guessing that you're already familiar with that sort of thing given your Windows background.
As far as using Qt, it should be the same on Mac as it is on Windows. As #JoachimPileborg points out, that is the point of a platform independent API!
Do be careful if you have any Os-specific dependencies. You haven't mentioned what other libraries etc you're using in the project, so I can't predict other issues that you might encounter.
Any more specific problems, or is that enough to get you started?

Deploying on multiple platforms and architectures? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am the lead developer in a small business which is just starting. We are developing a cross platform C library which is intended to run on as wide an array of architectures and operating systems as possible. We have extensive unit tests, so if these tests pass on a new platform then we can say with a fair amount of certainty that the library works reliably on that platform.
Up until now, I have been using Windows 32 bit (which is my development machine), as well as a Linode VPS to make sure the library works under Linux with GCC. Now, I am looking to deploy for other platforms as well (namely more Linux distribution flavors, Mac OS X, and preferably some of the smartphones if at all possible). I want to avoid virtualizing all of these platforms if I can. Are there any services that will allow me to deploy the library on many operating systems and architectures? For all of the platforms I mentioned above, I would like to make both 32 and 64 bit builds available and also for different processors as needed. I would like to be able to build the library for all of these platforms, and run the unit tests. The unit tests are written using Boost.test.
Does anyone have any recommendations? The best way would be if there was some sort of convenient cross compiler for the various platforms that I could install on my Linode VPS (Ubuntu 13.04), but a third party solution to which I should upload the code would also work.
The only cross platform compile (which has a tradition, is free and has the support of a large community) is gcc. Of course, there is Intel Compiler and many others (and even the newer, free clang which seems to be used by llvm, but it is still young). You can find a good list here (for C++, but you can scroll on the page and find for any other language):
http://en.wikipedia.org/wiki/List_of_compilers#C.2B.2B_compilers
If you want to build for Mac from Linux please check this:
http://www.bpiwowar.net/2012/06/cross-compiling-for-os-x-with-distcc-on-linux/
And for windows from Linux:
Manual for cross-compiling a C++ application from Linux to Windows?
Regarding the mobile platforms:
for Android, there is native support for Linux/Windows/Mac so you can use any of these platforms to build apps for it
for Windows Phone: Not so, maybe you manage to run Visual Studio using wine and then you're set, but otherwise there is no way that I know of. You can try CodeWeaver which is the "Wine for money" which seems to support Visual Studio 2008:
http://www.codeweavers.com/compatibility/browse/company/?letter=m;company_sort%5Bcompany_name%5D=ASC;company_curPos=200;company_id=1;sort%5Bapp_name%5D=ASC;curPos=400
Furthermore, you can try this application to develop programs in .NET:
http://monodevelop.com/
for Iphone: well, it is not straightforward but you can try this link:
http://www.saurik.com/id/4
I'm a Linux user myself, so the links above are "concentrated" on Linux as the primary dev system. Hope this helps! Good luck with your business!

Cross-Compiling C++/QT from a Mac for WIndows, Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I developed a C++/QT application and I am trying to compile it for Mac, Windows and Linux. I chose C++ just so I can make it compatible with these major operating systems. I can compile it for mac just fine.
I found out about Cross Compiling but some are outdated or not well documented... or does not guarantee they will work on the latest version of Windows or a Mac.
I do have Virtual Windows and Cent OS installed on my machine but I feel that compiling the application manually would be over kill.
So, do you recommend any reliable cross-compiler? Or is there any way to automate the compilation so if I have to, it can compile by logging on to my Virtual Windows or Cent OS installations?
FYI... not only cross compile but also generate 32 bit and 64 bit versions!
For Mac and linux you don't have a big issue here if you got the g++ compiler installed in your OS. But you will need to install Mingw or cygwin in the Windows installation to provide the gcc and the g++ compilers for your programs and if you want to automate your compilation process you can use a Makefile or try to see the autotools.
The only cross compiler that I know of is GCC. I have actually used it on Linux to cross-compile for S/390 a while back, and also to cross-compile ARM code on a Power Mac (I used the instructions here to set it up).
That said, I think that what you want is to cross-compile Windows x64 on a 32 bit virtual machine running Windows. If that is the case you are lucky, because Microsoft actually gives away the cross compilers for free with the Windows SDK since Windows 2000 SDK. I actually use the Windows Vista SDK (ver 6.1) on Virtual PC running XP to compile for Windows x64. Here you can download the latest version of the SDK, which comes with the compilers. I looked on the system requirements and it still supports XP, so this should be good for you.
Please note that the compilers are the same that come with Visual Studio, but you will have to invoke them from the command line environment installed by the SDK by either using 'cl' or 'nmake'.
You can chose the compilation mode by issuing SETENV /x86 for 32 bit or SETENV /x64 for 64 bits -there is another mode for Itanium but I have never used it-. The Visual Studio IDE is not included because it is a paid product, but good quality compilers for free is a good enough to anyone.

suggestion for good IDE for C/C++ with debugging features [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am currently using Eclipse for C/C++ programming. Though i am accustomed to using eclipse for Java, i cannot figure out a good workflow for using Eclipse for C/C++
What i find lacking is a good debugging support. STL structures (vector, map) are not displayed in debug view as they are equivalently displayed in Java. They are displayed in a very obscure manner which is hard to interpret.
Upon googling i found
Better variable exploring when debugging C++ code with Eclipse/CDT
but i find the method not robust. It cannot display STL structures with objects (strings too) in them. Extending the .gdbinit file to support those will be an entire new project for me (as i am a new programmer)
Is there some other IDE good for C/C++ programming and debugging. Or is there something i am missing because certainly for such a industry standard language there must be some good
support out there.
EDIT: I am on a Win or *nix
I use visual studio express on Windows. It is free with alot of debugging functions.
1. Microsoft Visual Studio Express C/C++ (Best for Windows)
2. Code Blocks (Best of *nix)
3. Eclipse for C/C++
4. Netbeans
Hope this helps
On Linux I would prefer to use Code::Blocks
You can also look for NetBeans
GNU DEBUGGER
The C and C++ editor is well integrated with the multi-session GNU gdb
debugger. You can set variable, exception, system call, line, and
function breakpoints and view them in the Breakpoints window. Inspect
the call stack and local variables, create watches, and view threads.
You can evaluate a selected expression by moving the cursor over it
and viewing the tooltip. The Disassembler window displays the assembly
instructions for the current source file.
If your on a mac xcode is pretty good.
Embarcadero C++ Builder, also available as part of RAD Studio, is quite good, and has been undergoing significant development over the past couple of years.
It can be used to develop Win32 apps, Win64 apps, Mac OS X apps, as well as iOS and Android apps (the mobile OS's are only in the RAD Studio in the Delphi language for now, but C++ support is expected by the end of the year)
It has excellent debugging support as well. The IDE runs only on Windows, but does work quite well in a Virtual Machine running Windows inside a Mac, with either VMWare or Parallels. It does require a Mac, running Xcode, to compile Mac OS X or iOS applications -- that can be a separate computer, or the "Mother Ship" if you are running Windows in a Virtual Machine on the Mac.

Is there any reference for LINUX and cross-platforms APIs? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
First, I develope C++ applications that invokes OS APIs (like CopyFile, GetModuleFileName, ... in Windows). I don't want to develope GUI applications. my applications work like a SERVICE or CONSOLE in WINDOWS.
Second, Standard C++ Libraries doesn't provide advance programming features like Threads, Network and even File Management.
In MS Windows platform, MSDN provides very good reference for C++ programmers that want to work with Windows APIs.
For example in this page: "EncodePointer Function", MSDN describes that EncodePointer is an API that "Minimum supported client is Windows Vista, Windows XP with SP2", "DLL
is Kernel32.dll" and ...
Now I want to start LINUX programming. I found too many libraries and references, some work in Fedora, some work in Ubunto, some work in SUSE and...
BUT I want ONE LIBRARY that works in ALL LINUX distributes. Something like Windows API that works in ALL WINDOWSes.
Is there any library that I write code once for linux? and don't worry about other distributes of LINUX?
Thanks.
There is a standard that should work (other than minor bugs or a few things that aren't implemented) across most Unix-type systems, including all Linux distros, the BSDs, Solaris, AIX, and so on. It's called POSIX or the Single Unix Specification; they are both basically equivalent, but published by different groups. You have to pay for POSIX, but the Single Unix Specification is available online for free.
Note that some of POSIX is implemented on Windows, and there are systems like Cygwin or Windows Services for Unix/Subsystem for Unix Applications to add more complete support of POSIX to Windows, though these generally require downloading separate libraries and runtime components, and can sometimes be frustrating work work with as things like line endings and file permissions work differently in Windows and Unix based APIs.
Beyond POSIX, Linux and glibc implement some system calls and library routines of their own, so if you're only interested in running on Linux and not other Unix-like operating systems, you have a somewhat richer API to work with. If you know what call you're looking for, you can use the man command on Linux to find documentation on it; system calls (like fork or execve) are documented in section 2, and library calls (like printf) are documented in section 3. Man pages can also be found online in a variety of places, such as the Linux man-pages project . There is also a complete online manual for glibc, and an online reference of Linux system calls.
If you want a book on the topic, The Linux Programming Interface by Michael Kerrisk, the guy who runs the Linux man-pages project, is supposed to be quite good.
For a reference on what should be supported across all distributions of Linux, you can take a look at the Linux Standard Base. Like POSIX, this is generally mostly supported on most distributions of Linux; there will be some minor deviations here and there, but on the whole it should tell you what's expected of a modern Linux. The Linux Standard Base mostly references other standards, like the Single Unix Specification/POSIX or the Filesystem Hierarchy Standard, but describes some Linux-specific functionality itself.
Yes, you want the POSIX library.
Leaving the fact that each version of Windows provides a slightly different API aside for the moment, each Linux distribution supports programming to glibc, the documentation of which is contained in section 2 of the man pages.
Qt is a good framework that can be used to develop once and compiled for all platforms including Windows.
Try BOOST
http://www.boost.org/