Skip to content

Commit

Permalink
Removed old Android init VK toast
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
  • Loading branch information
COM8 committed Oct 27, 2022
1 parent 6506aba commit 82c2460
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,6 @@ vectorToJFloatArray(JNIEnv* env, const std::vector<float>& fromVector)

extern "C"
{

JNIEXPORT jboolean JNICALL
Java_com_ethicalml_kompute_KomputeJni_initVulkan(JNIEnv* env, jobject thiz)
{

KP_LOG_INFO("Initialising vulkan");

uint32_t totalRetries = 0;

/*while (totalRetries < KOMPUTE_VK_INIT_RETRIES) {
KP_LOG_INFO("VULKAN LOAD TRY NUMBER: %u", totalRetries);
if (InitVulkan()) {
break;
}
sleep(1);
totalRetries++;
}*/

// return totalRetries < KOMPUTE_VK_INIT_RETRIES;
return true;
}

JNIEXPORT jfloatArray JNICALL
Java_com_ethicalml_kompute_KomputeJni_kompute(JNIEnv* env,
jobject thiz,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,7 @@ class KomputeJni : AppCompatActivity() {

binding.komputeGifView.getSettings().setUseWideViewPort(true)
binding.komputeGifView.getSettings().setLoadWithOverviewMode(true)

val successVulkanInit = initVulkan()
if (successVulkanInit) {
Toast.makeText(applicationContext, "Vulkan Loaded SUCCESS", Toast.LENGTH_SHORT).show()
} else {
binding.KomputeButton.isEnabled = false
Toast.makeText(applicationContext, "Vulkan Load FAILED", Toast.LENGTH_SHORT).show()
}
Log.i("KomputeJni", "Vulkan Result: " + successVulkanInit)


binding.predictionTextView.text = "N/A"
}

Expand Down

0 comments on commit 82c2460

Please sign in to comment.