Can we add TBB to android library ?

Can we add TBB to android library ?

Hi ,
I am planning to port the TBB to Android , to get performance gain on Multi-core processors.

Can i do that? what are the licensing issues.. ?

thanks in advance..

11 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

I've got the impression application developments on Google Android take placeusing Java?

In that case you'll have fine-grainconcurrency ala TBB with Java version 7 (coming upin 2011).

java -jar Mandelbrot.jar

Using JNI interface we can call cpp functions....which in turn uses libc....can this be added to libc?

I want to know more in terms of licensing also? can it be merged with android? what r the licensing issues?

So you're developing in Java right?

It's better torely on the work done by concurrency and Java experts such as Doug Lea. He's written a librarythat adds fine-grain multitasking, very much like TBB,to Java. This library is going to be in integral part ofJavaand fitin smoothly with its design philosophy and existing concurrency features.

My strong adviceis to go with the extended concurrency features offered inJava7. It will be the Java way of doing fine-grain multitasking.

Thank you UJ..i got ur point...

Out of curiosity i m asking: whether TBB is portable to android? while reading the document it said it can be used any platform which comply with ISO C++ standard cpp library.
In android we have only bionic libc, which is a C library.


I want to raise the same question. I have read the thread, but we are going to work on native C/C++ level of Android. So, we are not interesting in Java threads, we want to use TBB in our C++ code.
We actually hacked and compiled TBB for Android. It looks like we should implement several low-level platform specific functions to finish the work(atomic operations, operations controlling scheduling, etc). These functions use assembler instructions, such as cmpxchg or mfence. They are implemented as macros or inline functions for each OS and each architecture separately in different header files -- see the folder include/tbb/machine (files linux_ia32.h, linux_ia64.h, windows_ia32.h, sunos_sparc.h, etc).
The whole situation looks optimistic and we can create custom version of TBB, supporting Android. But we don't want to create a fork of TBB of course. Everybody will win if single TBB distibutive will work on every platform.

Kirill, would you mind to contribute to us the changes you have made? This will possibly simplify the work to enable TBB on Android.
You may also check whether recently added "generic GCC" port satisifes (some of) your needs; see for details.

I wrote some code once...

Hello, actually our initial version is just a hack. We simply commented all the platform specific code and get TBB compiled for Android. But it was not functional.

Currently, after you message about GCC generics, we decided to try to use them. Finally we get TBB compiled. Even a small TBB sample runs successfully on multicore ARM. BUT TBB can't create several threads and it has been linked statically, because we have some problems with dynamic linkage.
So, we want to solve these issues with threads creation and linkage. Than, in the case of success, we will send you a patch.

Hey guys, good evening. I've faced with the need to use TBB on Android patform by mixing that with NDK. As i see it is possible to compile and use TBB. Any news ?

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo