Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的RenderScript文件中,我有以下内容:
RenderScript
out.b = clamp(out.b, 0, 255);
构建项目时,出现以下错误:
error: call to 'clamp' is ambiguous
为什么会这样?
我认为它可能不知道输入的类型。对常量使用显式强制转换以匹配所有类型。
如果 out.b 是 uchar: out.b = clamp(out.b, (uchar)0, (uchar)255)
out.b = clamp(out.b, (uchar)0, (uchar)255)