Well I decided I prefer to use GPU over CPU especially since I'm working on a game and FPS will increase I expect. The thing is i'm not sure where to start. I can easily implement JOCL or JCUDA but after that I wouldnt know where to replace it from using CPU to GPU. Help is appreciated :)
Need help adding OpenCL(GPU Usage)
919 Views Asked by stdio.h At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in GPU
- Get GPU temperature in Android
- Can I use Julia to program my GPU & CPU?
- C: Usage of any GPU for parallel calculations
- Can I run Cuda or OpenCl on Intel processor graphics I7 (3rd or 4rd generation)
- How to get fragment coordinate in fragment shader in Metal?
- Is prefix scan CUDA sample code in gpugems3 correct?
- How many threads/work-items are used?
- When do we need two dimension threads in CUDA?
- What does a GPU kernel overhead consist of?
- Efficiently Generate a Heat Map Style Histogram using GLSL
- installing gputools on windows
- Make a dependent loop independent
- Is it possible to execute multiple instances of a CUDA program on a multi-GPU machine?
- CUDA cuBlasGetmatrix / cublasSetMatrix fails | Explanation of arguments
- Missing functions vload and vstore: OpenCL on Android
Related Questions in CPU
- 1MiB = 1024KiB = 2^10. Nonetheless, why not use just 1000 byte instead 1024 to calculate size?
- What is the simplest Turing complete CPU instruction set which can execute code from ROM?
- How to get CPU utilization in % in terminal (mac)
- Avoiding CPU Contention
- Lots of cache miss, Sparse matrix multiplication
- CPU new features enabled in Linux kernel
- Are correct branch predictions free?
- NUMA support on which CPU? What are the current server configuration of this kind of CPU?
- How to deal with virtual address when trying to get memory access pattern statistics?
- On x86, does enabling paging cause an "unconditional jump" (since EIP is now a virtual address)?
- cpu load when setting textbox value
- CPU usage exceeding 100% in top command third line
- 32bit cpu: how much memory can it use?
- CMOS Scaling vs Die Shrink
- Meaning of cores and logical processors in intel icore
Related Questions in JOCL
- GPGPU performance in high-level languages
- Help with JOCL on Mac
- OpenCL (JOCL) - 2D calculus over two arrays in Kernel
- Need help adding OpenCL(GPU Usage)
- opencl kernel float4 issues
- How to read txt file in OpenCL
- Releasing Memory Allocated by Native Libraries in Java
- OpenCL & Java - Weird Performance Results
- Java: Cast or reference multidimensional array into single dimensional array
- jocl neural network
- copying an image onto another with JOCL/OpenCL
- Why would JOCL CL.clEnqueueReadBuffer never return?
- CL_INVALID_KERNEL_ARGS in JOCL (a Java Binding to OpenCL).
- determine global memory available on GPU with JOCL?
- "UnsatisfiedLinkError: Native Library already loaded in another classloader" in multimodule project
Related Questions in JCUDA
- cuMemcpyDtoH yields CUDA_ERROR_INVALID_VALUE
- How can I pass a struct to a kernel in JCuda
- JCuda global shared memory causing errors
- cuda runtime api and dynamic kernel definition
- How to free the GPU memory in JCuda as free function provided in JCuda is not releasing the GPU memory in real time applications?
- Convert cudaStream_t object to CUStream object
- JCuda: copy multidimensional array from device to host
- Need help adding OpenCL(GPU Usage)
- Indexing in jCuda Pointer function
- Calculate Skintone using JCuda is not giving the right percentage
- Debug JCuda program
- What is the easiest way to run working CUDA code in Java?
- Packaging of JCUDA 0.6.0 on Mac OSX 10.9.3
- "CUDA_ERROR_ILLEGAL_ADDRESS" when executing cuCtxSynchronize() in JCUDA
- How to get CUDA event starting and ending time without using nvprof
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What kind of computations are you after? If those are compute intensive such as N-body gravity experiments, then you can simply copy variables to gpu then compute then copy results back to main memory.
If your objects have big data but small computation such as fluid dynamics or collision detection, then you should add interoperability between your graphics api and compute api. Then you can do only computations withouth any copying of data.(speed-up is like your GPU ram bandwidth divided by your pci-e bandwidth. For a HD7870, it is like 25x if compute power is not saturated already)
I used jocl and lwjgl using gl/cl interoperability in java and they were working very well.
Some neural network is trained with CPU(Encog) but used by GPU(jocl) to generate a map and drawn by LWJGL :(neuron weigths are changed a little to have some more randomizing effect)
Very important part is:
Example:
Changing a cpu code to a opencl code can be done automatically by APARAPI but Im not sure if it has interoperability.
If you need to do it yourself, then it is as easy as: