小编Mot*_*taF的帖子

什么是SYCL 1.2?

我正在尝试安装tensorflow

Please specify the location where ComputeCpp for SYCL 1.2 is installed. [Default is /usr/local/computecpp]: 
Invalid SYCL 1.2 library path. /usr/local/computecpp/lib/libComputeCpp.so cannot be found
Run Code Online (Sandbox Code Playgroud)

我该怎么办?什么是SYCL 1.2?

tensorflow

21
推荐指数
1
解决办法
2万
查看次数

如何在Ubuntu 16.04上安装Valgrind?

我已经尝试使用 http://valgrind.org/docs/manual/dist.install.html

但是化妆之后,我得到了

make[2]: Leaving directory '/home/milenko/valgrind-3.11.0/mpi'
Making all in solaris
make[2]: Entering directory '/home/milenko/valgrind-3.11.0/solaris'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/milenko/valgrind-3.11.0/solaris'
Making all in docs
make[2]: Entering directory '/home/milenko/valgrind-3.11.0/docs'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/milenko/valgrind-3.11.0/docs'
make[1]: Leaving directory '/home/milenko/valgrind-3.11.0'
Run Code Online (Sandbox Code Playgroud)

我在x86上,然后我尝试了

sudo apt-get install valgrind
Run Code Online (Sandbox Code Playgroud)

但是当我尝试从命令行调用它时

valgrind
valgrind: no program specified
valgrind: Use --help for more information.
Run Code Online (Sandbox Code Playgroud)

为什么?

installation ubuntu valgrind

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

Scala类型不匹配;找到:需要布尔值:List [Int]

我试图用简单的例子来解决我的sbt测试

package example
object Lists {
    def sum(xs: List[Int]): Int = {

        xs match {
      case x :: tail => x + sum(tail)
      case Nil => 0
     }
    }
    def max(xs: List[Int]): Int = {
      xs match {
        case Nil => throw new java.util.NoSuchElementException()
        case List(x) => x
        case x :: y :: rest => max ((if (x > y) x else y) :: rest)  
    }
    }

  }
Run Code Online (Sandbox Code Playgroud)

第二个文件可以从http://www.filedropper.com/listssuite_1下载

当我尝试用sbt测试时

[error] /home/milenko/dom1/example/src/test/scala/example/ListsSuite.scala:122: type mismatch;
[error]  found   : Boolean …
Run Code Online (Sandbox Code Playgroud)

scala sbt

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

Scala列表,map和flatMap

我现在正看着M.Odersky的书中的例子

List.range(1, 5) flatMap (
i => List.range(1, i) map (j => (i, j))
)
Run Code Online (Sandbox Code Playgroud)

好的,首先我们创建1,2,3,4接下来会发生什么的列表?什么是

i => List.range(1, i)
Run Code Online (Sandbox Code Playgroud)

在做什么?创建

(1,1)
(1,2)
(1,3)
(1,4)
Run Code Online (Sandbox Code Playgroud)

是还是不是?

如果我试图逃避flatMap

scala> List.range(1,5) (i => List.range(1,i) map (j => (i, j)))
<console>:11: error: missing parameter type
       List.range(1,5) (i => List.range(1,i) map (j => (i, j)))
Run Code Online (Sandbox Code Playgroud)

为什么?

scala operators

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

标签 统计

scala ×2

installation ×1

operators ×1

sbt ×1

tensorflow ×1

ubuntu ×1

valgrind ×1