AMD Open64: Optimized math functions - instruction-set

Does Open64 has something equivalent to Intel Short Vector Math Library Operations.
Thank you.

OK, I more or less figured it out. AMD OpenMP ships with AMD's math library ACML. ACML has functions similar to those in Intel's library.

Open64 is just a compiler, so you can link what ever library you needs to the object file that open64 compiler generates.

Related

SIFT feature detection in C

I am working on a SIFT feature detection in Opencv. The problem is the libraries supporting this project (ex: features2d,nonfree) are available only in .hpp and I need to write in C. So any suggestions?
I'm hoping that I don't have to translate the libraries.
.hpp usually indicates a C++ header. If you really need a C interface, write a wrapper library. But I would just use a C++ compiler for the whole project.

what is the difference between Linux ARM ELF and iOS ARM ELF files?

The subject says it. But just to make it more clear, I wonder what the difference is in detail. I mean binary header, or some data alignment, or ways to map and remap functions or something else you know of?
Can you just use Android ARM ELF binary on iOS? Why not? I mean syscalls? libc? elf format difference? I know Darwin is not Linux. So maybe syscalls. But I am just guessing, I want to know from someone who knows.
For example I compile with arm-ios gcc, and then link with arm-linux ld, what will happen? Will it work? Or why exactly not if not?
Sorry, my wording is messy, because I lack some deep knowledge. But that is why I look for expertise. Otherwise I would know how to find this info myself.
Thank you
iOS binaries don't use ELF file format but mach-o file format. Which are totally different formats.

Functions from MATLAB to XCode

Essentially what I'm trying to do, is turn the following function:
function [template, mask] = createiristemplate(eyeimage_filename)
into a form useable by Xcode. I've spent several hours poring over the internet, and have yet to find a clean way to make it work. Any help would be greatly appreciated.
If you are talking about Xcode, the mac IDE: https://en.wikipedia.org/wiki/Xcode
According to wikipedia, this software can support the following languages:
C, C++, Objective-C, Objective-C++, Java, AppleScript, Python and Ruby
So the only way, is to use matlab coder, it is a matlab tool to convert matlab code in C or C++ :
http://www.mathworks.fr/products/matlab-coder/index.html
But it is an expansive toolbox.

pthread_rwlock functions missing in libc of ndk?

I am trying to port some c++ code to my android application using NDK.
But the c++ code involves calls to some pthread_rwlock functions which is absent in the libc provided with the NDK.
I have found implementations of these functions but including them, it asks for more header files and more implementations and the problem grows.
Does somebody have a solution to this.
Thanks!
I stumbled over the same issue with NDK r5b where rwlock was in the header but not in the lib.
In the latest r5c this seems resolved.
Android's pthread implementation lacks read/write locks. You'll need to use standard locks instead. A work around may be to write some wrappers that simply use the standard locks. Another approach may be to use Android's atomic APIs to roll your own.
Relevant items in the AOSP bug database:
pthread_rwlock functions are missing
pthread_rwlock static init constant is broken

Trying to mix in OpenCL with CUDA in NVIDIA's SDK template

I have been having a tough time setting up an experiment where I allocate memory with CUDA on the device, take that pointer to memory on the device, use it in OpenCL, and return the results. I want to see if this is possible. I had a tough time getting a CUDA project to work so I just used Nvidia's template project in their SDK. In the makefile I added -lOpenCL to the libs section of the common.mk. Everything is fine when I do that, but when I add #include <CL/cl.h> to template.cu so I can start making OpenCL calls, I get over a 100 errors. They all look similar to this, but with different function names at the end:
/usr/lib/gcc/x86_64-linux-gnu/4.4.1/include/xmmintrin.h(334): error:
identifier "__builtin_ia32_cmpeqps" is undefined
I am having a hard time figuring out why. Please help if you can. Also, if there is an easier way to set up a project that'll be able to call the CUDA and OpenCL APIs let me know.
I haven't really worked with cuda, so I don't know how helpful my answer is.
From what I understand you are trying to use opencl directly from your cuda hostcode, which is if I remember correctly compiled using some compiler from nvidia instead the standard gcc. So the problem is probably that this compiler doesn't implement the necessary builtins to work with the mentioned headers.
Look here for a similar problem and it's solution:
http://forums.nvidia.com/lofiversion/index.php?t88573.html
It seems you have to put everything which needs the opencl api into a different (non cuda) compilation unit so that it will be compiled by the non nvidia compiler.
However I wouldn't count on this working (since opencl buffers aren't just pointers to the memory but should contain some metainformations to), simply because there is no real reason it should work and if it does there is no guarantee that it continues to do so.
What you could try if you really want to is using opengl for the interop, since both opencl and cuda have extensions to allow creating buffers from opengl buffers.
However why do you need to do this? Whats keeping you from using Apple's implementation shortterm, since IIRC it's open source and most of it (the opencl parts) should be platform independent anyways.

Resources