What's meaning of the "run_once" in Caffe2's FillOp - caffe2

As in the
Github link
the "run_once" in the GaussianFill.
And where is the definition of the "run_once"?

Related

How to use <stacktrace> in GCC trunk?

From https://github.com/gcc-mirror/gcc/commit/3acb929cc0beb79e6f4005eb22ee88b45e1cbc1d commit, C++ standard header <stacktrace> exists things such as std::stacktrace_entry but is not declared since _GLIBCXX_HAVE_STACKTRACE is not defined neither.
I have tried this on https://godbolt.org/z/b9TvEMYnh but linker error is emitted once I have added the argument -lstd++_libbacktrace (ofc, it was not found)
#include <stacktrace> // header found
int main() {
// can't use features like 'std::stacktrace_entry' and 'std::stacktrace'
}
What does this message mean from the commit description? :
For now, the new library is only built if --enable-libstdcxx-backtrace=yes is used.
Part of building GCC from source is to run the configure shell script and pass it a bunch of arguments to tell it how to behave. That commit message is telling you that in order to enable this feature, you must add the following configure argument:
--enable-libstdcxx-backtrace=yes

Where is rs2_device_info defined in details?

I am exploring Intel's librealsense library. Tracing the code, I can see that rs2_device_info is defined in rs_types.h as follows:
typedef struct rs2_device_info rs2_device_info;
However, it does not contain detailed the actual definition like rs2_intrinsics in the same file. Could someone show me where it is? How can the code compile if the actual definition is missing? Thanks.
The definition of rs2_device_info can be found in ./src/context.h.
Specifically it is defined as:
struct rs2_device_info
{
std::shared_ptr<librealsense::context> ctx;
std::shared_ptr<librealsense::device_info> info;
};
As a note, after you clone the repo and navigate to the directory you can run the command
grep -r . -e "struct rs2_device_info"

Possible linker errors to parse for visual studio compiling with GCC

As per this question, Visual Studio cannot parse and display errors from GCC in c or c++. I have found at least one instance where linker errors are not found by the error parsing script in the answer.
As far as i have found there are two major linker errors that occur.
Unresolved external symbol
Caused by the following examples (amoung others):
extern int i; // No definition of i
void nodef(); // No definition of a function
class A {
static int b; // No external definition (int A::b) of b (c++ only)
}
No Such file or directory
If an object file (.o) is removed before the linker runs, you have an error occur. This is usually caused by a git-cleanup followed by a regular build (instead of rebuild), currently this error case is not covered by the linked questions answer. But this is an easy fix.
Are there any other linker errors (other than unresolved external and no such file) in c/c++ that I need to be aware of for complete coverage of this error parsing script?
At least one other error is Multiple definition of when something is defined multiple times.

having linker error developing in c++ using IAR and Renesas rx62n and Ucos III

I purchased Michael Barr's embedded bootcamp training. It includes an IAR project that have all libraries configured. This project file is what all projects are created from. The code in project file are in c. I would like to develop in c++. There was an LCD library that I removed. The bsp and cpu files are all in c. I think there is a linking library for Ucos III theres a file in linker configuratuion called ucosIII.a . I can compile but I am getting linker errors:
Error[Li005]: no definition for "_CPU_IntDisMeasStart" [referenced from os_task.o(uCOS-III.a)]
Error[Li005]: no definition for "_CPU_IntDisMeasStop" [referenced from os_task.o(uCOS-III.a)]
Error[Li005]: no definition for "_CPU_TS_Update" [referenced from C:\embedded Bar grp\Exercises\RealtimeIObjects\Exercise1\Debug\Obj\os_cpu_c.o]
Error[Li005]: no definition for "_adc_isr" [referenced from C:\embedded Bar grp\Exercises\RealtimeIObjects\Exercise1\Debug\Obj\adcisr.o]

Redefinition of Functions Error

I am making a mobile app with the C++ API Mosync(2.7) the IDE uses eclipse. When I compile I get these errors & I'm not sure how I fix them:
c:/slave/buildScripts/temp_EjFB/source/libs/libsupc++/new_opvnt.cc:1:
Error: Symbol '__Znam' is already defined,
c:/slave/buildScripts/temp_EjFB/source/libs/libsupc++/new_opnt.cc:37:
Error: Symbol '__Znwm' is already defined,
c:/slave/buildScripts/temp_EjFB/source/libs/libsupc++/del_opvnt.cc:68:
Error: Symbol '__ZdaPv' is already defined,
c:/slave/buildScripts/temp_EjFB/source/libs/libsupc++/del_opnt.cc:36:
Error: Symbol '__ZdlPv' is already defined,
c:/slave/buildScripts/temp_EjFB/source/libs/MAStd/maxtoa.c:40: Error:
Symbol '_xtoa' is already defined,
I'm pretty sure when I created my project I selected NativeUI project(or maybe NativeUI C++). And my build settings are:
Include Paths: %mosync-home%/include
Library Paths: %mosync-home%/lib/pipe
Additional Libs: mastd.lib, MAUtil.lib, NativeUI.lib
There is a copy of my whole project here if it will help: http://www.mosync.com/content/build-error-redefinition-functions
How can I get my project to compile?
It looks like you have included the same library twice.
You should check this in you project settings.
I will point the MoSync support team at this question, sorry for the late reply.
There should be no need to include mastd.lib unless "Ignore Default" checkboxes are checked.
I suggest to create a new project from a template (using File/New Project...) and copy the settings in that project. In your project the only field that should need to be filled in is:
Additional Libraries: MAUtil.lib, NativeUI.lib
You can also post questions to the MoSync Forum: http://www.mosync.com/forum
Hopefully, you will get a quicker response at the forum :)