Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Java interface in 5.0?

pascal_bamford
Beginner
1,004 Views
Before downloading 5.0b, there was a question asking whether I was going to evaluate the'Java interface to all IPP entries'.
Did this feature not make it into the beta version?
Thanks for all your great work -I have been usingand relying onIPP since 1.0b.
- Pascal.
0 Kudos
10 Replies
Ying_S_Intel
Employee
1,004 Views
Pascal,
Thanks for your comments.
Yes we do have Java interface implementation offered in IPP 5.0 beta, they are introduced as sample. You can find IPP samples with Java interface for both Windows* and Linux* in "Beta Intel IPP Samples" product via Intel Premier Support. Please download and evaluate these java samples. Let us know how you think these new samples.

By the way, this posting contains all IPP 5.0beta sample descriptions:
http://softwareforums.intel.com/ids/board/message?board.id=IPP&message.id=2380
Hope it helps.
Thanks,
Ying
0 Kudos
pascal_bamford
Beginner
1,003 Views
Are the .h files missing from ipp_sample->java->src->native?
0 Kudos
Vladimir_Dudnik
Employee
1,004 Views
Hi,
headers are generated automatically, by javah
Regards,
Vladimir
0 Kudos
Samuel_L_1
Beginner
1,004 Views

Hi, 

   I have native c file and I generated header file, but when i compile them using Visual C++, it give me errors.

0 Kudos
SergeyKostrov
Valued Contributor II
1,004 Views
>>... I have native c file and I generated header file, but when i compile them using Visual C++, it give me errors. Samuel, Could you post a complete compilation output with these errors? Also, what version of Microsoft compiler ( IDE ) do you use?
0 Kudos
Samuel_L_1
Beginner
1,004 Views

another question is I want to replace String class in Java to enhance the performace like ippstring in C# ( it gives me 100 times performance enhancement), but i C#, we can use 

fixed( char* ps=str, pd=this.value )
{
sp.ippsCopy_16s( (short*)ps, (short*)pd, str.Length );
}

but we cannot use pointer in Java, so the question is how to call sp.ippsCopy_16s in Java?

big thanks

0 Kudos
Bernard
Valued Contributor I
1,004 Views
Is there a possibility to use JNI? In Java are passed reference of type String which internally behaves as a pointer.How to implement it in your code I do not know.
0 Kudos
SergeyKostrov
Valued Contributor II
1,004 Views
>>...so the question is how to call sp.ippsCopy_16s in Java? I think the best way is C-wrappers around all IPP functions you want to use and these C-wrappers need to be called using JNI. There are lots of examples on the web on how to do it ( I mean how to call a C function in a DLL from Java ). I could send you a very small project that demonstrates application of JNI. In overall, a Java applet calls a function in a DLL implemented in C language.
0 Kudos
Samuel_L_1
Beginner
1,004 Views

actually i want to write a new class to replace java.lang.String. But we know in java string we use char[] to store data of string., like 

public final class String implements java.io.Serializable, Comparable<String>,CharSequence {
/** The value is used for character storage. */
private final char value[];

/** The offset is the first index of the storage that is used. */
private final int offset;

/** The count is the number of characters in the String. */
private final int count;

...

...

}

when i want to call the function like sp.ippsCopy_16s or sp.ippsCopy_16sc, I didn't find any function support char[] parameter, actually

in JNI is :

     public static native int ippsCopy_16s ( short pSrc[], short pDst[], int len)

so the question is how can I use IPP functions in Java for char type? ( Shall I use short type?)

0 Kudos
SergeyKostrov
Valued Contributor II
1,004 Views
>>...so the question is how can I use IPP functions in Java for char type? ( Shall I use short type?) You need to look at JNI ( Java Native Interface ) and it is an additional layer between a Java application, or applet, and functions implemented in a C/C++ DLL(s).
0 Kudos
Reply