小编use*_*133的帖子

适用于英特尔CPU和Nvidia GPU的OpenCL

我正在尝试开始使用一些OpenCL编码.

我已经在我的计算机上安装了NVidia CUDA OpenCL,并设法构建了一个简单的"Hello World!" 使用Visual Studio 2017的应用程序.

我还安装了英特尔OpenCL SDK(安装警告我,我需要更新我的OpenCL驱动程序,但英特尔更新管理器告诉我一切都是最新的,所以我不确定这是否是一个问题).

现在每当我在PC上查询OpenCL平台时,都是如此:

std::vector< cl::Platform > platformList;
cl::Platform::get(&platformList);
Run Code Online (Sandbox Code Playgroud)

我只回到我的nVidia openCL平台,我的GPU是唯一的设备.我的CPU没有得到任何回报.

有人可以帮忙吗?是否可以在同一个项目中执行CPU和GPU OpenCL计算(在不同的OpenCL上下文中?我将如何进行此操作?

nvidia intel opencl

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

弹簧靴。无法找到“org.hibernate.SessionFactory”类型的 bean

我似乎无法弄清楚为什么我的 Spring Boot 应用程序无法自动创建 SessionFactory。据我了解,它应该自动获取属性文件并能够创建会话工厂 bean。

我需要在一些 Dao 类中使用会话工厂和 hibernate,但是下面的简单示例重现了我遇到的问题:

pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>mytools</groupId>
<artifactId>spring-boot-hello-world</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <start-class>mytools.spring.hello.Application</start-class>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <version>2.0.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
        <version>2.0.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>2.3.4</version>
    </dependency>
    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.3.0</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.0.1.RELEASE</version>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)

应用程序属性:

spring.datasource.url=jdbc:hsqldb:file:databaseFiles/hibData/;hsqldb.write_delay_millis=0
spring.datasource.root=sa
spring.datasource.password=1

spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.HSQLDialect
spring.jpa.properties.hibernate.show_sql=false
spring.jpa.properties.hibernate.hbm2ddl.auto=update
spring.jpa.properties.hibernate.jdbc.batch_size=50
spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.order_updates=true
spring.jpa.properties.hibernate.jdbc.batch_versioned_data=true
Run Code Online (Sandbox Code Playgroud)

应用类:

package …
Run Code Online (Sandbox Code Playgroud)

java spring hibernate spring-boot

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

Jenkins 没有在 Ubuntu 中获取已更改的配置文件 (/etc/default/jenkins)

使用:

  • Ubuntu 20.04.2 LTS
  • Java 1.8.0_322
  • 詹金斯2.332.1

我一直在尝试更改 /etc/default/jenkins 文件中的 HTTP 端口或用户。但是,一旦我这样做,这些更改就不会被接受:

sudo service jenkins restart
Run Code Online (Sandbox Code Playgroud)

这里的答案似乎也不起作用: Jenkins更改/etc/default/jenkins不起作用

sudo systemctl edit jenkins
Run Code Online (Sandbox Code Playgroud)

只需打开一个新文件进行编辑

java ubuntu jenkins systemctl

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

标签 统计

java ×2

hibernate ×1

intel ×1

jenkins ×1

nvidia ×1

opencl ×1

spring ×1

spring-boot ×1

systemctl ×1

ubuntu ×1