missing toString() methods added
This commit is contained in:
parent
65164e2075
commit
eb07d69cd8
@ -423,5 +423,10 @@ public abstract class Buffer extends AbstractOpenCLObject {
|
||||
//default implementation, overwrite for better performance
|
||||
releaseBufferForSharingAsync(queue).release();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Buffer (" + getSize() + "B)";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -436,4 +436,10 @@ public abstract class Context extends AbstractOpenCLObject {
|
||||
* @return the new program
|
||||
*/
|
||||
public abstract Program createProgramFromBinary(ByteBuffer binaries, Device device);
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Context (" + getDevices() + ')';
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -532,6 +532,26 @@ memory layout in which channels are stored in the image.
|
||||
//default implementation, overwrite it for performance improvements
|
||||
releaseImageForSharingAsync(queue).release();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append("Image (");
|
||||
ImageType t = getImageType();
|
||||
str.append(t);
|
||||
str.append(", w=").append(getWidth());
|
||||
if (t == ImageType.IMAGE_2D || t == ImageType.IMAGE_3D) {
|
||||
str.append(", h=").append(getHeight());
|
||||
}
|
||||
if (t == ImageType.IMAGE_3D) {
|
||||
str.append(", d=").append(getDepth());
|
||||
}
|
||||
if (t == ImageType.IMAGE_1D_ARRAY || t == ImageType.IMAGE_2D_ARRAY) {
|
||||
str.append(", arrays=").append(getArraySize());
|
||||
}
|
||||
str.append(", ").append(getImageFormat());
|
||||
str.append(')');
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
//TODO: add variants of the above two methods that don't create the event object, but release the event immediately
|
||||
}
|
||||
|
@ -424,7 +424,12 @@ public abstract class Kernel extends AbstractOpenCLObject {
|
||||
setArgs(args);
|
||||
RunNoEvent(queue);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Kernel (" + getName() + ")";
|
||||
}
|
||||
|
||||
/**
|
||||
* A placeholder for kernel arguments representing local kernel memory.
|
||||
* This defines the size of available shared memory of a {@code __shared} kernel
|
||||
@ -468,6 +473,12 @@ public abstract class Kernel extends AbstractOpenCLObject {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LocalMem (" + size + "B)";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -519,6 +530,12 @@ public abstract class Kernel extends AbstractOpenCLObject {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LocalMemPerElement (" + size + "B)";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -623,6 +640,21 @@ public abstract class Kernel extends AbstractOpenCLObject {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append("WorkSize[");
|
||||
for (int i=0; i<dimension; ++i) {
|
||||
if (i>0) {
|
||||
str.append(", ");
|
||||
}
|
||||
str.append(sizes[i]);
|
||||
}
|
||||
str.append(']');
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -124,4 +124,9 @@ public final class JoclPlatform implements Platform {
|
||||
return platform.getExtensions();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -124,4 +124,9 @@ public final class LwjglPlatform implements Platform {
|
||||
return Arrays.asList(platform.getInfoString(CL10.CL_PLATFORM_EXTENSIONS).split(" "));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -125,4 +125,9 @@ public final class LwjglPlatform implements Platform {
|
||||
return Arrays.asList(Info.clGetPlatformInfoStringASCII(platform.address(), CL10.CL_PLATFORM_EXTENSIONS).split(" "));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user