Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
30 lines (27 loc) · 842 Bytes

File metadata and controls

30 lines (27 loc) · 842 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package symjava.bytecode;
public class BytecodeBatchVecFunc implements BytecodeVecFunc {
BytecodeVecFunc func;
int vecLen; //Input vector length
int retLen; //Return vector length
public BytecodeBatchVecFunc(BytecodeVecFunc func, int vecLen, int retLen) {
this.func = func;
this.vecLen = vecLen;
this.retLen = retLen;
}
@Override
public void apply(double[] outAry, int outPos, double[]... args) {
double[] tmpBuf = new double[retLen];
double[][] tmpArgs = new double[args.length][vecLen];
int destPos = 0;
int argPos = 0;
for(int i=0; i<args[0].length/vecLen; i++) {
for(int j=0; j<args.length; j++) {
System.arraycopy(args[j], argPos, tmpArgs[j], 0, vecLen);
}
func.apply(tmpBuf, 0, tmpArgs);
System.arraycopy(tmpBuf, 0, outAry, destPos, retLen);
destPos += retLen;
argPos += vecLen;
}
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.