Boost logo

Boost Users :

Subject: Re: [Boost-users] Possible to use with JNI?
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2015-04-15 14:23:43


On Wed, Apr 15, 2015 at 10:57 AM, Yolanda Septiana <yolapopop_at_[hidden]> wrote:
> Ah... I'm really lost here. The reason that I want to use Boost with Java is
> because I found that:
> The original VF2lib (ported from C to Java) is somehow slower than Boost. I
> checked by trying to find subgraph isomorphism between graph A (10 nodes)
> and graph B (500 nodes). VF2lib took longer than 5 minutes but Boost was
> just some milliseconds.
> (If someone can verify that I'll be really grateful).
>
> So what option do I have to be able to use Boost? I think I should a file
> based graph generated by Java and process them with Boost.
>
>
> On Wed, Apr 15, 2015, 9:30 PM Lorenzo Trivelli
> <trivelli.lorenzo_at_[hidden]> wrote:
>>
>> At 06:30 13/04/2015, you wrote:
>> >Hi, I really need to use Java with this library. Is it possible to use
>> > JNI on this library or do I need to convert this library to Java? I find the
>> > latter task is going to be really difficult so I hope that I can use JNI.
>> >
>> >Thank you for your help.
>>
>> Hi, AFAIK it is not easy to do that due to C++ name mangling and
>> the absence of any ABI in C++ itself like C
>>
>> A possible but limited workaround should be to create a DLL with a C
>> interface
>> which uses the boost objects you need. Next, you can call it through JNI,
>> but obviously you can pass only basic data types

The expert opinion is that you should be able to develop a DLL with C
interface, and leverage the Boost/C++ behind the C API. You'll need to
know the data types translations between the two, but this should be
readily documented, or for the most part more or less discoverable.

>> regardds
>> Lorenzo
>>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net