当前位置: 首页>>代码示例>>Java>>正文


Java Parallel.loop方法代码示例

本文整理汇总了Java中edu.mines.jtk.util.Parallel.loop方法的典型用法代码示例。如果您正苦于以下问题:Java Parallel.loop方法的具体用法?Java Parallel.loop怎么用?Java Parallel.loop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在edu.mines.jtk.util.Parallel的用法示例。


在下文中一共展示了Parallel.loop方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: apply1

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
/**
 * Applies this filter along the 1st array dimension.
 * Input and output arrays can be the same array.
 * @param x input array.
 * @param y output array.
 */
public void apply1(float[][][] x, float[][][] y) {
  final float[][][] xx = x;
  final float[][][] yy = y;
  final int n2 = x[0].length;
  final int n3 = x.length;
  Parallel.loop(n3,new Parallel.LoopInt() {
    public void compute(int i3) {
      for (int i2=0; i2<n2; ++i2) {
        float[] x32 = xx[i3][i2];
        float[] y32 = yy[i3][i2];
        smooth1(_ei,_zs,_a1,x32,y32);
      }
    }
  });
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:22,代码来源:RecursiveExponentialFilter.java

示例2: apply3

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
/**
 * Applies this filter along the 3rd array dimension.
 * Input and output arrays can be the same array.
 * @param x input array.
 * @param y output array.
 */
public void apply3(float[][][] x, float[][][] y) {
  final float[][][] xx = x;
  final float[][][] yy = y;
  final int n2 = x[0].length;
  final int n3 = x.length;
  Parallel.loop(n2,new Parallel.LoopInt() {
    public void compute(int i2) {
      float[][] x2 = new float[n3][];
      float[][] y2 = new float[n3][];
      for (int i3=0; i3<n3; ++i3) {
        x2[i3] = xx[i3][i2];
        y2[i3] = yy[i3][i2];
      }
      smooth2(_ei,_zs,_a3,x2,y2);
    }
  });
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:24,代码来源:RecursiveExponentialFilter.java

示例3: marchParallel

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
/**
 * Performs an adapted version of marching cubes whereby the precomputed
 * edge-intersections are employed.
 * Parallel version.
 */
private void marchParallel(float[][][] array, float c) {
  final float[][][] farray = array;
  final float fc = c;
  final int i3step = 2;
  int i3start = 0;
  final int i3stop = _n3-1;
  for (int i3pass=0; i3pass<i3step; ++i3pass,++i3start) {
    Parallel.loop(i3start,i3stop,i3step,new Parallel.LoopInt() {
      public void compute(int i3) {
        _tlist[i3] = new IntList();
        _stlist[i3] = new IntList();
        _xlist[i3] = new FloatList();
        march(farray,fc,i3,_xlist[i3],_tlist[i3],_stlist[i3]);
      }
    });
  }
}
 
开发者ID:chrisengelsma,项目名称:3d-painting,代码行数:23,代码来源:Painting3.java

示例4: apply2

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
/**
 * Applies this filter along the 2nd array dimension.
 * Input and output arrays can be the same array.
 * @param x input array.
 * @param y output array.
 */
public void apply2(float[][][] x, float[][][] y) {
  final float[][][] xx = x;
  final float[][][] yy = y;
  final int n3 = x.length;
  Parallel.loop(n3,new Parallel.LoopInt() {
    public void compute(int i3) {
      float[][] x3 = xx[i3];
      float[][] y3 = yy[i3];
      smooth2(_ei,_zs,_a2,x3,y3);
    }
  });
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:19,代码来源:RecursiveExponentialFilter.java

示例5: szero

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
private static void szero(final float[][][] x) {
  final int n3 = x.length;
  Parallel.loop(n3,new Parallel.LoopInt() {
    public void compute(int i3) {
      szero(x[i3]);
    }
  });
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:9,代码来源:LocalSmoothingFilter.java

示例6: scopy

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
private static void scopy(final float[][][] x, final float[][][] y) {
  final int n3 = x.length;
  Parallel.loop(n3,new Parallel.LoopInt() {
    public void compute(int i3) {
      scopy(x[i3],y[i3]);
    }
  });
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:9,代码来源:LocalSmoothingFilter.java

示例7: sdot

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
private static float sdot(final float[][][] x, final float[][][] y) {
  final int n3 = x.length;
  final float[] d3 = new float[n3];
  Parallel.loop(n3,new Parallel.LoopInt() {
    public void compute(int i3) {
      d3[i3] = sdot(x[i3],y[i3]);
    }
  });
  float d = 0.0f;
  for (int i3=0; i3<n3; ++i3)
    d += d3[i3];
  return d;
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:14,代码来源:LocalSmoothingFilter.java

示例8: saxpy

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
private static void saxpy(
  final float a, final float[][][] x, final float[][][] y)
{
  final int n3 = x.length;
  Parallel.loop(n3,new Parallel.LoopInt() {
    public void compute(int i3) {
      saxpy(a,x[i3],y[i3]);
    }
  });
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:11,代码来源:LocalSmoothingFilter.java

示例9: sxpay

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
private static void sxpay(
  final float a, final float[][][] x, final float[][][] y)
{
  final int n3 = x.length;
  Parallel.loop(n3,new Parallel.LoopInt() {
    public void compute(int i3) {
      sxpay(a,x[i3],y[i3]);
    }
  });
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:11,代码来源:LocalSmoothingFilter.java

示例10: sxy

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
private static void sxy(
  final float[][][] x, final float[][][] y, final float[][][] z) 
{
  final int n3 = x.length;
  Parallel.loop(n3,new Parallel.LoopInt() {
    public void compute(int i3) {
      sxy(x[i3],y[i3],z[i3]);
    }
  });
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:11,代码来源:LocalSmoothingFilter.java

示例11: apply1

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
/**
 * Applies this filter along the 1st dimension of a 2D array.
 * @param x input array x; may be the same as the output array y.
 * @param y output array y; may be the same as the input array x.
 */
public void apply1(final float[][] x, final float[][] y) {
  int n = x.length;
  Parallel.loop(n,new Parallel.LoopInt() {
  public void compute(int i) {
    apply(x[i],y[i]);
  }});
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:13,代码来源:SymmetricTridiagonalFilter.java

示例12: apply2

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
/**
 * Applies this filter along the 2nd dimension of a 3D array.
 * @param x input array x; may be the same as the output array y.
 * @param y output array y; may be the same as the input array x.
 */
public void apply2(final float[][][] x, final float[][][] y) {
  int n = x.length;
  Parallel.loop(n,new Parallel.LoopInt() {
  public void compute(int i) {
    apply2(x[i],y[i]);
  }});
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:13,代码来源:SymmetricTridiagonalFilter.java

示例13: applyInverse1

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
/**
 * Applies the inverse of this filter along the 1st dimension of a 2D array.
 * @param x input array x; may be the same as the output array y.
 * @param y output array y; may be the same as the input array x.
 */
public void applyInverse1(final float[][] x, final float[][] y) {
  int n = x.length;
  Parallel.loop(n,new Parallel.LoopInt() {
  public void compute(int i) {
    applyInverse(x[i],y[i]);
  }});
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:13,代码来源:SymmetricTridiagonalFilter.java

示例14: applyInverse2

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
/**
 * Applies the inverse of this filter along the 2nd dimension of a 3D array.
 * @param x input array x; may be the same as the output array y.
 * @param y output array y; may be the same as the input array x.
 */
public void applyInverse2(final float[][][] x, final float[][][] y) {
  int n = x.length;
  Parallel.loop(n,new Parallel.LoopInt() {
  public void compute(int i) {
    applyInverse2(x[i],y[i]);
  }});
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:13,代码来源:SymmetricTridiagonalFilter.java

示例15: computeGradientProducts

import edu.mines.jtk.util.Parallel; //导入方法依赖的package包/类
private void computeGradientProducts(
  final float[][][] g1, final float[][][] g2, final float[][][] g3,
  final float[][][] g11, final float[][][] g12, final float[][][] g13,
  final float[][][] g22, final float[][][] g23, final float[][][] g33)
{
  final int n1 = g1[0][0].length;
  final int n2 = g1[0].length;
  final int n3 = g1.length;
  Parallel.loop(n3,new Parallel.LoopInt() {
    public void compute(int i3) {
      for (int i2=0; i2<n2; ++i2) {
        float[] g1i = g1[i3][i2];
        float[] g2i = g2[i3][i2];
        float[] g3i = g3[i3][i2];
        float[] g11i = g11[i3][i2];
        float[] g12i = g12[i3][i2];
        float[] g13i = g13[i3][i2];
        float[] g22i = g22[i3][i2];
        float[] g23i = g23[i3][i2];
        float[] g33i = g33[i3][i2];
        for (int i1=0; i1<n1; ++i1) {
          float g1ii = g1i[i1];
          float g2ii = g2i[i1];
          float g3ii = g3i[i1];
          g11i[i1] = g1ii*g1ii;
          g22i[i1] = g2ii*g2ii;
          g33i[i1] = g3ii*g3ii;
          g12i[i1] = g1ii*g2ii;
          g13i[i1] = g1ii*g3ii;
          g23i[i1] = g2ii*g3ii;
        }
      }
    }
  });
}
 
开发者ID:MinesJTK,项目名称:jtk,代码行数:36,代码来源:LocalOrientFilter.java


注:本文中的edu.mines.jtk.util.Parallel.loop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。