|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnxm.ice.lib.HPCore
public class HPCore
Structure for a Code-Once-Run-Everywhere library function This function may have implementations in more than one language. The NeXtMidas policy is to code HPCore functions in C or Fortran to allow code sharing with other versions of Midas. All other framework and GUI code is in Java for portability and deployment options. Typically, math functions needed by GUIs are included in the SYS tree. Some functions are coded here in Java and in C for performance comparisons. The Java code for each function library exposes methods for setting and getting each of the library's properties. If native code is used, the Java wrapper loads the native code and calls the standard library interface routines as appropriate. This class implements a factory for instantiating alternate native implementations. Library names should adhere to the following naming conventions: Foo.java - the java implementation of the function Foo and/or native wrapper stubs Foo$CPU.c - the CPU native implementation of Foo (C) Foo$GPU.c - the GPU implementation of Foo (CUDA) Foo$VHS.c - the Verilator Hardware Simulator implementation of Foo (C++) Foo$ICE.c - the ICE FPGA implementation of Foo (FPGA)
Field Summary | |
---|---|
static int |
CPU
|
static java.lang.String |
factoryList
|
static int |
GPU
|
static int |
ICE
|
int |
implementation
|
static int |
JDK
|
static int |
VHS
|
Fields inherited from interface nxm.sys.inc.Constants |
---|
ANGULAR_VELOCITY_PRECESSING_COR, B1G, B1K, B1M, B1T, B64K, CYC2RAD, DEF_EARTH_ANGULAR_VELOCITY, DEG2METERS, DEG2RAD, E, EARTH_ANGULAR_VELOCITY, EARTH_ECCENTRICITY, EARTH_EQUATORIAL_RADIUS, EARTH_FLATTENING_FACTOR, EARTH_GRAV_CONSTANT_W_ATMOS, EARTH_GRAV_CONSTANT_W_ATMOS_ORIG, EARTH_GRAV_CONSTANT_WO_ATMOS, EARTH_GRAV_CONSTANT_WO_ATMOS_ORIG, FEET2METERS, HALFPI, IAU_EARTH_ANGULAR_VELOCITY, LN2DB, LN2LOG, LNTEN, MASS_OF_EARTH_W_ATMOS, METERS2DEG, METERS2FEET, METERS2NM, METERS2SM, NM2FEET, NM2METERS, PI, POLAR_RADIUS_IN_METERS, POLAR_RADIUS_OF_CURVATURE, RAD2CYC, RAD2DEG, SECOND_EARTH_ECCENTRICITY, SM2FEET, SM2METERS, SPEED_OF_LIGHT, TWOPI |
Fields inherited from interface nxm.sys.inc.DataTypes |
---|
ALAW, ASCII, BMAX, BMIN, BOOL, BYTE, COMPLEX, CONVERT_TYPE_LIST, CRAY, DATA_MODE_LIST, DATA_TYPE_LIST, DMAX, DMIN, DOUBLE, EEEI, falseStates, FLOAT, FMAX, FMIN, IEEE, IMAX, IMIN, INT, LMAX, LMIN, LONG, MATRIX, modeList, MULT_DATA_MODE_LIST, NIBBLE, NMAX, NMIN, NONHOMOGENEOUS, NUMBER, NUMERIC_DATA_TYPE_LIST, numericTypeList, OBJECT, PACKED, QUAD, repList, RESULT_TYPE_LIST, SCALAR, STRING, TABLE, TRANSMATRIX, trueStates, typeList, ULAW, VAX, VECTOR, XLONG, XMAX, XMIN, XMODE, XMVALUE, XMVALUE_KVLIST, XMVALUE_LIST, XMVALUE_TABLE |
Constructor Summary | |
---|---|
HPCore()
|
Method Summary | |
---|---|
int |
close()
|
static HPCore |
forName(java.lang.String className)
Create an instance of the function specified by full class name |
static HPCore |
forName(java.lang.String name,
nxm.sys.lib.Args args)
Create an instance of the function specified by name and parsing of the Args class |
static HPCore |
forName(java.lang.String path,
java.lang.String name,
int impl)
Create an instance of the function specified by path, name, and implementation |
nxm.sys.lib.Data |
get(java.lang.String key,
byte type)
GetKey for generic parameter. |
double |
getD(java.lang.String key)
GetKey helper for double parameter |
byte |
getDataType()
get the natural data format type |
float |
getF(java.lang.String key)
GetKey helper for float parameter |
int |
getL(java.lang.String key)
GetKey helper for int parameter |
java.lang.String |
getS(java.lang.String key)
GetKey helper for String parameter |
boolean |
getState(java.lang.String key)
GetKey helper for state parameter |
boolean |
isSet(java.lang.String list,
java.lang.String key,
int mask)
Helper for testing options bits |
int |
open()
Initialize this engine with current parameters |
int |
process(byte[] buf1,
int n1)
|
int |
process(byte[] buf1,
int n1,
byte[] buf2,
int n2)
|
int |
process(byte[] buf1,
int n1,
byte[] buf2,
int n2,
byte[] buf3,
int n3)
|
int |
process(int n)
|
void |
set(java.lang.String key,
boolean value)
SetKey helper for state parameter |
void |
set(java.lang.String key,
nxm.sys.lib.Data value)
SetKey for generic parameter. |
void |
set(java.lang.String key,
double value)
SetKey helper for double parameter |
void |
set(java.lang.String key,
float value)
SetKey helper for float parameter |
void |
set(java.lang.String key,
int value)
SetKey helper for int parameter |
void |
set(java.lang.String key,
java.lang.String value)
SetKey helper for String parameter |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String factoryList
public static int JDK
public static int CPU
public static int GPU
public static int VHS
public static int ICE
public int implementation
Constructor Detail |
---|
public HPCore()
Method Detail |
---|
public static HPCore forName(java.lang.String name, nxm.sys.lib.Args args)
public static HPCore forName(java.lang.String path, java.lang.String name, int impl)
public static HPCore forName(java.lang.String className)
public int open()
public int process(int n)
public int process(byte[] buf1, int n1)
public int process(byte[] buf1, int n1, byte[] buf2, int n2)
public int process(byte[] buf1, int n1, byte[] buf2, int n2, byte[] buf3, int n3)
public int close()
public void set(java.lang.String key, nxm.sys.lib.Data value)
public void set(java.lang.String key, java.lang.String value)
public void set(java.lang.String key, double value)
public void set(java.lang.String key, float value)
public void set(java.lang.String key, int value)
public void set(java.lang.String key, boolean value)
public nxm.sys.lib.Data get(java.lang.String key, byte type)
public java.lang.String getS(java.lang.String key)
public double getD(java.lang.String key)
public float getF(java.lang.String key)
public int getL(java.lang.String key)
public boolean getState(java.lang.String key)
public boolean isSet(java.lang.String list, java.lang.String key, int mask)
public byte getDataType()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |