欢迎光临散文网 会员登陆 & 注册

阅码场AIKit人工智能项目实战 - TensorFlow篇

2022-10-21 23:48 作者:al_sa  | 我要投稿

public class ArraySumForForkJoinPool {    public static int sumParallel(int[] array) throws ExecutionException, InterruptedException {        ForkJoinPool pool = new ForkJoinPool();        return pool.submit(new SubArraySum(array, 0, array.length - 1)).get();    }    public static void main(String[] args) throws ExecutionException, InterruptedException {        System.out.println(sumParallel(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9}));    }

阅码场AIKit人工智能项目实战 - TensorFlow篇的评论 (共 条)

分享到微博请遵守国家法律