From 472d23eb6118b38f533d4ee7981b140cb8a8052a Mon Sep 17 00:00:00 2001 From: CoreRasurae <luis.p.mendes@gmail.com> Date: Fri, 27 Apr 2018 18:16:33 +0100 Subject: [PATCH] Docs: Javadoc for IProfileReportObserver was incorrect - update --- src/main/java/com/aparapi/IProfileReportObserver.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/aparapi/IProfileReportObserver.java b/src/main/java/com/aparapi/IProfileReportObserver.java index 43c17ba8..c2f9b903 100644 --- a/src/main/java/com/aparapi/IProfileReportObserver.java +++ b/src/main/java/com/aparapi/IProfileReportObserver.java @@ -29,11 +29,13 @@ public interface IProfileReportObserver { /** * The listener method will be invoked each time a profile report becomes available for each Aparapi Kernel which has * a registered observer.<br/> - * <b>Note1: </b>A report will be generated by a thread executing a kernel, but if multiple threads execute the same kernel, - * on the same device, the report rate is limited to a single thread at a time per kernel per device.<br/> + * <b>Note1: </b>A report will be generated by a thread executing a kernel. If multiple threads execute the same kernel, + * concurrently, this method can be called concurrently too, thus classes implementing this interface need to provide + * a thread safe method. * <br/> - * <b>Note2: </b>When an observer is registered there is no need to acknowledge the reception of a profile report, a new - * one will be automatically generated when another thread runs the same kernel on the same device. + * <b>Note2: </b>If profiling information is to be stored has a {@link com.aparapi.ProfileReport}, it is necessary to clone + * the profileInfo object with {@link com.aparapi.ProfileReport#clone()}. A WeakReference is used to help differentiate such + * need, however it is guaranteed that profileInfo will not be null, during the method execution. * <br/> * @param kernelClass the class of the kernel to which the profile report pertains * @param device the device on which the kernel ran, producing the profile report -- GitLab