简体   繁体   English

将jni代码转换为renderscript

[英]Converting jni code to renderscript

I want to convert my existing jni code into renderscript because I think there will be a performance benefit. 我想将现有的jni代码转换为renderscript,因为我认为这样做会带来性能上的好处。 I have no idea about renderscript but I want to ask this: 我不知道渲染脚本,但我想问一下:

My jni code uses sha computation taken from openSSL libs. 我的jni代码使用从openSSL库获取的sha计算。 Is there any way to compute sha on renderscript directly? 有什么方法可以直接在renderscript上计算sha吗? Or Will I have to convert openSSL libs into renderscript code as well? 还是我也必须将openSSL库转换为renderscript代码? That sounds like a hard job since I have no idea how to do it. 这听起来很难,因为我不知道该怎么做。 Any other ideas on how to compute Sha on renderscript? 关于如何在renderscript上计算Sha的其他想法?

You will have to port an existing SHA-1 algorithm of your choice to RenderScript (C99-like), add few modifications to benefits of the parallelism and take in account few subtleties related to Renderscript itself (no malloc, static versus non static, etc). 您将必须将选择的现有SHA-1算法移植到RenderScript (类似于C99),对并行性的好处进行少量修改,并考虑到与Renderscript本身相关的一些微妙之处(无malloc,静态与非静态等)。 )。

You might also search on github or other public code source repository if someone has already implemented it, for example AES has been. 您也可以在github或其他公共代码源存储库上搜索(如果有人已经实现了它,例如AES)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM