clMathLibraries / clBLAS

a software library containing BLAS functions written in OpenCL
Apache License 2.0
842 stars 240 forks source link

Add logging mechanism #1

Open kknox opened 11 years ago

kknox commented 11 years ago

Incorporate logger functionality that creates a human readable text file with all clBLAS function calls and all parameter values logged. This gives users visibility to which clBLAS functions are called and how many times. The library should allow for multiple levels of logging; one level that only logs API calls, then extra verbosity levels that also log warnings, errors and optimization hints.

kknox commented 11 years ago

Noting that this comment is an implementation detail, I believe that the logging mechanism should exist in a separate library. The clBLAS library should attempt to dynamically load ( i.e. with ::LoadLibrary() ) the logging library in its current directory on clBLAS startup. If the logger library exists, it is loaded and a log file is created in the current directory; otherwise if the logging library is not found then logging is disabled.