Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.
/ clwprime Public archive

Solve Wilson's theorem with OpenCL - Compute if p is prime

License

Notifications You must be signed in to change notification settings

voldien/clwprime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clwprime


clwprime is a program for solving if p is a prime or not by using Wilson's theorem. It solves it with parallel computation. Reducing the time complexity for bigger p than if it were to be computed with serial computation. This program works similar to the wprime program. The Differences is that it solves the prime in serial computation.

Examples


  1. Check if 13 is prime. Returns 1 if true or 0 if false.
clwprime 13
  1. Check if 13 is prime. Will print the result in a human readable format.
clwprime 13 -h
  1. Check if piped 13 is prime.
echo '13' | clwprime 

Dependencies


In order to compile the program, the following Debian packages has to be installed.

apt-get install opencl-headers

Because each graphic card vendor has their own driver for implementing OpenCL. You'll have check what packets has to be installed for the graphic cards on host in order for the OpenCL work on the system.

The clinfo programmed can be installed with apt-get. It will display information about each OpenCL compatible devices on the host. If no information is displayed, then either there is not OpenCL compatible devices or the driver is not installed properly.

About

Solve Wilson's theorem with OpenCL - Compute if p is prime

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published