Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7915963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:38:01+00:00 2026-06-03T14:38:01+00:00

Java and OpenCL both support Heterogeneous Computing; systems with multiple architecture working cooperatively in

  • 0

Java and OpenCL both support Heterogeneous Computing; systems with multiple architecture working cooperatively in parallel(Task and data parallel ).

portability is the main goal in both the cases, and both have achieved this goal to a large extent. In fact still OpenCl cannot be run on FPGAs and DSPs, as the tools are not available. JVM can be developed for GPUs FPGA, ARM etc.

Both generate intermediate code.

Despite so many similarities why and when should one prefer OpenCL over Java for Heterogeneous Computing?

EDITED

Please be specific to my question: Despite so many similarities why and when should one prefer OpenCL over Java for Heterogeneous Computing? Why at all I chose OpenCL instead of Java?
If you say openCl has better performance then my immediate question will be why it is so(since both generate intermediate code that need to be converted into binaries for specific h/w).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:38:02+00:00Added an answer on June 3, 2026 at 2:38 pm

    OpenCL is normally used for processing large amounts of parallel operations(calculations etc). This is where OpenCL thrives and the throughput of your program is really increased by it.

    Java is a general purpose language for writing applications running on various platforms/devices.

    They have a different purpose as tools but you can use OpenCL from your Java program using JOCL. I also used a tool from AMD called Aparapi. because I wanted my application to carry out some calculations, a job that my ASUS AMD 6970 card seemed to get done faster than my 6 core AMD 1090T Phenom Black Edition.

    Just for you to know what Aparapi is(taken from the google code site):

    Aparapi allows Java developers to take advantage of the compute power
    of GPU and APU devices by executing data parallel code fragments on
    the GPU rather than being confined to the local CPU. It does this by
    converting Java bytecode to OpenCL at runtime and executing on the
    GPU, if for any reason Aparapi can’t execute on the GPU it will
    execute in a Java thread pool.


    Despite so many similarities why and when should one prefer OpenCL
    over Java for Heterogeneous Computing?

    One would choose OpenCL for parallel processing tasks that would otherwise take a lot of time to be executed on the CPU. The disadvantage in this case would be the extra heat and power consumption costs. Bear also in mind that some tasks would execute faster on a CPU. It all depends on the application that most of the time would require trials on both types of chips in order to decide which one does the job best.

    Why at all I chose OpenCL instead of Java?

    One would choose OpenCL over Java for parallel processing oriented tasks. OpenCL is a tool built for this purpose. OpenCL is not something you would use for building enterprise or desktop applications. Java is a programming language for almost any domain running on many platforms. If one would know that using OpenCL would save them 24 hours of calculations over Java; of course Java would be sidelined and OpenCL would be the way to go or simply OpenCL could be used through a Java application.

    If you say openCl has better performance then my immediate question
    will be why it is so(since both generate intermediate code that need
    to be converted into binaries for specific h/w).

    It has better performance on specific applications since GPU have more cores than a CPU. Their frequency though is quite low so this means that they are better on parallel tasks rather than sequential. You have to bear in mind that OpenCL is used for basic calculations and not for building full flavor applications…at least as far as I know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use Java Opencl from within jruby, but am encountering a problem
I'm working on a 3d globe application written in java using java3d for the
I can not find much about the OpenCL Java implementation in LWJGL. For instance
I've read about OpenCL lately and there is a library in Java that will
I am trying to setup a program that uses Java and OpenCL. I am
I'm writing an application (on android) that uses both java code, and native code.
Momentarily I'm trying to write a raycaster engine with OpenCL and Java (LWJGL). However
I'm working on a Java 2D rendering program (running on 1.6.0_11), which uses external
I'm working on a personal Java OpenGL (JOGL) project and I'm using some custom
I've just started learning LWJGL (Java OpenGL), and i'm encountering an enormous amount of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.