小编vri*_*vri的帖子

执行bitonic排序时java.lang.NoClassDefFoundError

我想使用java的fork join模型实现bitonic排序.这是分拣机的代码

import java.util.concurrent.RecursiveAction;

public class BitonicSortTask extends RecursiveAction
{
    private final int array[];
    private final int low;
    private final int high;
    private final int dir;

    public BitonicSortTask(int array[],int low,int high,int dir)
    {
        this.array = array;
        this.low = low;
        this.high = high;
        this.dir= dir;
    }

    @Override
    protected void compute()
    {
        if(high>1)
        {
            int temp = high/2;
            BitonicSortTask left = new BitonicSortTask(array, low, temp,1);
            BitonicSortTask right = new BitonicSortTask(array, temp+1,high,0);
            invokeAll(left, right);
            BitonicMerge(array, low, high, dir);
        }
    }

    private void BitonicMerge(int[] …
Run Code Online (Sandbox Code Playgroud)

java multithreading fork-join forkjoinpool

1
推荐指数
1
解决办法
1091
查看次数

标签 统计

fork-join ×1

forkjoinpool ×1

java ×1

multithreading ×1