<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=CORE_JDK</id>
	<title>CORE JDK - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=CORE_JDK"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=CORE_JDK&amp;action=history"/>
	<updated>2026-04-19T09:01:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=CORE_JDK&amp;diff=495&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;The Core class in nxm.ice.lib provides the standard framework for developing a Java callable Core. The wrappers for each hardware implementation are auto-generated by the inne...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=CORE_JDK&amp;diff=495&amp;oldid=prev"/>
		<updated>2020-04-14T15:06:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The Core class in nxm.ice.lib provides the standard framework for developing a Java callable Core. The wrappers for each hardware implementation are auto-generated by the inne...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The Core class in nxm.ice.lib provides the standard framework for developing a Java callable Core. The wrappers for each hardware implementation are auto-generated by the inner class definitions in the Java reference class.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Here is an example Java reference implementation of the noop function contained in the file Noop.java:&lt;br /&gt;
&lt;br /&gt;
The three declarations for the CPU, VHS, and ICE classes are all that is needed to have NeXtMidas build the Native code and/or code wrappers for those implementations as well.&lt;br /&gt;
&lt;br /&gt;
  package nxm.ice.core;&lt;br /&gt;
  &lt;br /&gt;
  import nxm.ice.lib.*;&lt;br /&gt;
  import nxm.sys.lib.Data;&lt;br /&gt;
  import nxm.sys.lib.Convert;&lt;br /&gt;
  &lt;br /&gt;
  /**&lt;br /&gt;
    Implements data copy with optional decimation and reformat.&lt;br /&gt;
  */&lt;br /&gt;
  public class Noop extends CoreFactory {&lt;br /&gt;
  &lt;br /&gt;
   // native implementation wrappers&lt;br /&gt;
   public static class CPU extends CoreNative { public native long alloc(); }&lt;br /&gt;
   public static class VHS extends CoreNative { public native long alloc(); }&lt;br /&gt;
   public static class ICE extends CoreNative { public native long alloc(); }&lt;br /&gt;
  &lt;br /&gt;
   // java implementation&lt;br /&gt;
   public static class JVM extends Core {&lt;br /&gt;
  &lt;br /&gt;
    private int dec,ioff,ibps,obps;&lt;br /&gt;
  &lt;br /&gt;
    /** set parameters */&lt;br /&gt;
    public void set (String key, Data value) {&lt;br /&gt;
      if (key.equals(&amp;quot;DECIMATION&amp;quot;)) dec  = value.toL();&lt;br /&gt;
      else super.set(key,value);&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    /** get parameters */&lt;br /&gt;
    public Data get (String key, byte type) {&lt;br /&gt;
      if (key.equals(&amp;quot;DECIMATION&amp;quot;))  return new Data(dec);&lt;br /&gt;
      else return super.get(key,type);&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    /** Ready this engine with current parameters */&lt;br /&gt;
    public int open() {&lt;br /&gt;
      ioff = 0;&lt;br /&gt;
      ibps = getFormatBytes(1);&lt;br /&gt;
      obps = getFormatBytes(2);&lt;br /&gt;
      return 0;  /** process a buffer of data */&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    public int process (byte[] a, int na, byte[] b, int nb) {&lt;br /&gt;
      int n=0,i=ioff,n1=na/ibps;&lt;br /&gt;
      if (ibps==1) {&lt;br /&gt;
        for (; i&amp;lt;n1; i+=dec) b[n++]=a[i];&lt;br /&gt;
      }&lt;br /&gt;
      else if (ibps==2) {&lt;br /&gt;
        short[] ai = Convert.castI(a,true);&lt;br /&gt;
        short[] bi = Convert.castI(b,false);&lt;br /&gt;
        for (; i&amp;lt;n1; i+=dec) bi[n++]=ai[i];&lt;br /&gt;
        Convert.uncast(ai,a,false);&lt;br /&gt;
        Convert.uncast(bi,b,true);&lt;br /&gt;
      }&lt;br /&gt;
      else if (ibps==4) {&lt;br /&gt;
        int[] ai = Convert.castL(a,true);&lt;br /&gt;
        int[] bi = Convert.castL(b,false);&lt;br /&gt;
        for (; i&amp;lt;n1; i+=dec) bi[n++]=ai[i];&lt;br /&gt;
        Convert.uncast(ai,a,false);&lt;br /&gt;
        Convert.uncast(bi,b,true);&lt;br /&gt;
      }&lt;br /&gt;
      ioff = i%n1;&lt;br /&gt;
      return n*obps;&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
   }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
[[Category:ICE_Cores|0]]&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>