LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: [Solved] OpenCL no Platforms found  (Read 192 times)

Evan407

  • Newbie
  • *
  • Offline Offline
  • Posts: 42
[Solved] OpenCL no Platforms found
« on: May 24, 2017, 20:32:45 »

Code: [Select]
package com.evanstools.opencl.demo;
import static org.lwjgl.opencl.CL10.*;
import org.lwjgl.*;
import java.nio.*;
import static org.lwjgl.BufferUtils.*;
class Demo{
  public static void main(String[] args){
    PointerBuffer platforms = createPointerBuffer(1);
    IntBuffer num_platforms = createIntBuffer(1);
    clGetPlatformIDs(platforms,num_platforms);
    System.out.printf("Number of platforms: %d%n",num_platforms.get());
  }
}
Quote
Number of platforms: 0
Logged

Evan407

  • Newbie
  • *
  • Offline Offline
  • Posts: 42
Re: OpenCL no Platforms found
« Reply #1 on: May 24, 2017, 20:40:06 »

this solved it
Code: [Select]
sudo apt install nvidia-opencl-icd-375
Quote
"Number of platforms: 1"
Logged