Java interface in 5.0?

Java interface in 5.0?

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.

11 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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

Are the .h files missing from ipp_sample->java->src->native?

vladimir-dudnik (Intel)'s picture

Hi,

headers are generated automatically, by javah

Regards,
Vladimir

Hi, 

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

Attachments: 

AttachmentSize
Download cipp.zip2.63 MB

>>... 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?

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

iliyapolak's picture

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.

>>...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.

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?)

>>...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).

Login to leave a comment.