Skip to content

Tag: c++

strange output from g_print

I get the following error when I compile my code: file.h: In function ‘add_new_set’: file.h:7:53: warning: format not a string literal and no format arguments [-Wformat-security] g_print (gtk_entry_get_text ((GtkEntry *)((struct data *) callback_params)->entry)); here’s my code: now when …

perf enable demangling of callgraph

How do I enable C++ demangling for the perf callgraph? It seems to demangle symbols when I go into annotate mode, but not in the main callgraph. Sample code (using Google Benchmark): build command: perf commands: I’ve also tried enabling the –demangle option, but that doesn’t seem to affect …

Covariance matrix with opencl and opencv

I recently start to learn opencl and how to create kernel for OpenCV as well. I am still working with the basics. I need to implement an opencl kernel for calculate the covariance matrix. This function don’t have any opencl kernel already implemented by opencv’s fundation. Technically what I want …

Extracting type info from printf format string

I’d like to extract c++ type information from a printf format string. For example, I’ve attempted this using parse_printf_format() from printf.h, but the returned argtypes don’t appear to include information about signed/unsigned. Is there some way to get signed/unsigned info as well? Answer…

PHP popen Application cannot open shared object

I’ve created a simple C++ Application with the boost framework. The Application is running correct from the command line. After this I’ve created a PHP file with a popen to this binary. After visiting the website I’ve got the following error message from apache2/error_log System is openSuse …

How to control global OpenMP settings from C/C++?

OpenMP doesn’t provide API to adjust some crucial settings in runtime, e.g. OMP_WAIT_POLICY or GOMP_SPINCOUNT (at least in gcc 4.8.3). Such settings are designed to be changed through environment variables for some reason. Not very convenient. Is there any way I can change such settings in run-time from…