com.nativelibs4java.opencl.util.Fun1 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javacl Show documentation
Show all versions of javacl Show documentation
JavaCL is an Object-Oriented API that makes the C OpenCL API available to Java in a very natural way.
It hides away the complexity of cross-platform C bindings, has a clean OO design (with generics, Java enums, NIO buffers, fully typed exceptions...), provides high-level features (OpenGL-interop, array reductions) and comes with samples and demos.
For more info, please visit http://code.google.com/p/nativelibs4java/wiki/OpenCL.
The newest version!
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.nativelibs4java.opencl.util;
public enum Fun1 {
not("!"),
complement("~"),
abs,
log,
exp,
sqrt,
sin,
cos,
tan,
atan,
asin,
acos,
sinh,
cosh,
tanh,
asinh,
acosh,
atanh;
final String prefixOp;
Fun1(String op) {
this.prefixOp = op;
}
Fun1() {
this(null);
}
void expr(String a, StringBuilder out) {
if (prefixOp != null)
out.append('(').append(prefixOp).append(a).append(')');
out.append(name()).append('(').append(a).append(')');
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy