Package org.renjin.gcc.runtime

Examples of org.renjin.gcc.runtime.DoublePtr.unwrap()


    Method method = clazz.getMethod("testmax", DoublePtr.class);
   
    DoublePtr x = new DoublePtr(-1);
    method.invoke(null, x);

    assertThat(x.unwrap(), equalTo(0d));
   
    x = new DoublePtr(Double.NaN);
    method.invoke(null, x);
   
    System.out.println(x.unwrap());
View Full Code Here


    assertThat(x.unwrap(), equalTo(0d));
   
    x = new DoublePtr(Double.NaN);
    method.invoke(null, x);
   
    System.out.println(x.unwrap());
   
    assertTrue(Double.isNaN(x.unwrap()));
  }

  @Test
View Full Code Here

    x = new DoublePtr(Double.NaN);
    method.invoke(null, x);
   
    System.out.println(x.unwrap());
   
    assertTrue(Double.isNaN(x.unwrap()));
  }

  @Test
  public void fortran2darrays() throws Exception {
    Class clazz = compile("2darray.f", "ArrayTest");
View Full Code Here

    DoublePtr y = new DoublePtr(0);
    method = clazz.getMethod("localarray_", DoublePtr.class);
    method.invoke(null, y);

    assertThat(y.unwrap(), equalTo(110d));
  }

  @Test
  public void arrayC() throws Exception {
    Class clazz = compile("array.c", "ArrayCTest");
View Full Code Here

    DoublePtr y = new DoublePtr(0);
    method = clazz.getMethod("localarray_", DoublePtr.class);
    method.invoke(null, y);

    assertThat(y.unwrap(), equalTo(110d));

  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.