Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to improve a JAVA program performances using GPU programming.
After some research on the internet I found that it is possible if i use jcuda or jocl, but the problem is that the kernel code must be written in C in both cases.
and the algorithm that i want every thread to execute is very complicated to be written in C (it does some computations to know if there will be an accident between two aircrafts) so an object-oriented language is necessery.
Is there a solution ? or must we translate the whole project to C++ ?
Thanks for your help !
Simple rule: if it needs object orientation, it looses its performance. Even if you are using GPU acceleration.
I would advise you to identify the parallel parts of your program code. You do not have to transfer all of your algorithm to the GPU device. Is there any aspect of paralellization, e.g. arrays or grids that are filled?
What kind is your simulation message exchange? Is it explicit, i.e. sending messages around your kernels, or implicit via synchronization.
You should at least give us some more information about you algorithm and its data layout.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'd like to make a simulation, but I'd like to write the code to display the state of the simulation and the user interaction (frontend?) in Java (Kotlin actually, but I don't think it is relevant here) for the JVM, and I'd like to write the actual code of the simulation (backend?) in Rust. Mostly because I think it would be neat and that I would learn something.
Can I achieve this, and if yes, how? It might be relevant that the data that needs to be exchanged between the two programs is just a fixed-size array of floats.
Thank you for your help.
A Rust program compiles to native code (executable or shared library). To call native code from Java you have to use JNI: https://www.baeldung.com/jni.
You may find the jni crate useful for the Rust side of the project: https://docs.rs/jni/0.16.0/jni/
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to monitor constantly changing values against different conditions.
Example case:
Value: Location (changes every 5 seconds)
Condition: If location.near(Boston) do ...
It seems easy to do for one value and condition, but if there are multpile values and conditions I fear it will cripple the hardware because it will run on Android devices.
Is there a design pattern to help me with this?
I think that a good solution can be a Rule Engine. There are some rule engines that work fine on Android platform, e.g. Jess.
Another lightweight rule engine available on Java is Reguloj
Basically, a rule engine is based on a set of rules, each of which consists in a condition and an ation.
Here you can find more about your choice to use or not a rule engine.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
What, if any, are the differences between Dynamic Code Analysis and Penetration Testing? Are they related?
These are two concepts which barely have any relation at all.
Dynamic Code Analysis is the observation of a program while it is being executed to gain insight into the program and see what it does and how it does it.
Penetration Testing is an attempt to try out common exploits and hacking techniques on a system by or with permission of the owner. The intention is to detect security flaws so they can be fixed. Penetration testing does not necessarily focus on software. A good penetration test should cover all components of a system. This includes hardware, operating system, software and also the vulnerability of any human components to social engineering attempts.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Can anybody tell me of a way that one can determine the efficiency of a program that i have written, that is not specific to a particular computer. For instance a piece of code running on an i3 may take 1 second, but on an i7 it may take 0.95 seconds. Then if you test the program again if the computer is doing just a little more work the times may increase to 1.0001 and 0.950003 respectively. I want a way to measure efficiency in a way that would be the same on all archs. Is that (mathematically,...,) possible?
I want a way to measure efficiency in a way that would be the same on all archs
You wont get exactly the same number on the same machine, running at the same CPU speed with the same code and the same version of Java.
You can't hope to get a number which will be the same across architectures, with different versions of Java, CPUs, speed, loads, OSes.
In short, your question is not possible on any real machine. Only a theoretical one which is why big-O is for a theoretical machine (and is derived from the code, not measured)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Just a quick question, as googling it lead to not any (good) results: Can CryEngine 3 be used from within Java? And if so, would it be a good choice or not?
Currently I am trying something in jME3 (jMonkey) and it seems to be doing pretty well, only I think that CryEngine 3 should be capable of more.
As the Cryengine compiles to DLLs and you can access DLLs via the Java Native Interface. So it shouble be theoretically possible. Considering the size and complexity of the Cryengine3, I'm pretty sure they are at CryEngine 5 or 6 till you have wrapped the necessary functions of the CryEngine 3. Also calling native functions is quite expensive performancewise, so shouldn't expect any great performance. On the other hand till you are finished, processor speed will increased significantly.
Doing games with High-End graphics in Java is usally not possible. While jMonkeyEngine3 seems to be quite good, I'm sure it will not reach the quality of a good professional C/C++(/C#) Engine. When you want to get serious with game development, there are currently two options.
Learn C++ and/or C#. That are the languages usually used for larger games.
Do Browsergames. Than you can do the all the logic on the server in Java and just the presentation in flash or html5. But currently this limits you basically to 2D, because WebGL, etc. are not mature and fast enough to do a 3D game with an high end graphics.