--- Log opened Wed Aug 17 00:00:09 2016 | ||
-!- shogun-notifier- [~irker@7nn.de] has joined #shogun | 05:07 | |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 04e3f7e / src/shogun/io/streaming/InputParser.h,src/shogun/io/streaming/ParseBuffer.h: https://github.com/shogun-toolbox/shogun/commit/04e3f7e53bd1a69a142a4c89d3a250e4c9ce0f24 | 05:07 |
---|---|---|
shogun-notifier- | shogun: Add c++11 based implementation for threading in InputParser and ParseBuffer | 05:07 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * abee797 / src/shogun/lib/Time.cpp,src/shogun/lib/Time.h: https://github.com/shogun-toolbox/shogun/commit/abee797846e6fba73b5cd52579907659bfb02213 | 05:07 |
shogun-notifier- | shogun: Fix struct timeval definition for MSVC | 05:07 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 79a3dbc / src/shogun/mathematics/ajd/FFDiag.cpp,src/shogun/mathematics/ajd/JediDiag.cpp: https://github.com/shogun-toolbox/shogun/commit/79a3dbc8ed7f0a72069ae525b5f92d9e63fb5bbc | 05:07 |
shogun-notifier- | shogun: Fix implementation where runtime variable was used for array size on the stack | 05:07 |
shogun-notifier- | shogun: use SGMatrix or SGVector instead | 05:07 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 97af9bf / src/shogun/features/StringFeatures.cpp,src/shogun/io/SGIO.cpp: https://github.com/shogun-toolbox/shogun/commit/97af9bfcf3d3d97a2e1ee437bd37085fbbd18278 | 05:07 |
shogun-notifier- | shogun: Add MSVC implementation of directory listing to StringFeatures | 05:07 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * eadd291 / src/shogun/lib/external/PMurHash.h: https://github.com/shogun-toolbox/shogun/commit/eadd29171efaaaa916d07ef20de1ae00ece0bc41 | 05:07 |
shogun-notifier- | shogun: Use uint32_t for MurMurHash3 when MSVC defines it | 05:07 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 28a0160 / src/shogun/io/SGIO.h: https://github.com/shogun-toolbox/shogun/commit/28a0160ac69d4bd80325b61025f5dee906faf386 | 05:07 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 1649cf5 / / (9 files): https://github.com/shogun-toolbox/shogun/commit/1649cf57d75ceb9809580507fcd3e3522a08f30d | 05:07 |
shogun-notifier- | shogun: Fix unit tests for MSVC | 05:07 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * b997a73 / CMakeLists.txt,cmake/external/GoogleTestNMock.cmake: https://github.com/shogun-toolbox/shogun/commit/b997a7303c44d2e8a97860e4c6378eacb91ae529 | 05:07 |
shogun-notifier- | shogun: Fix unit test framework compiler flags | 05:07 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * c1b2115 / appveyor.yml,tests/unit/CMakeLists.txt: https://github.com/shogun-toolbox/shogun/commit/c1b21156f96c0199fc610cee895490347879fade | 05:07 |
shogun-notifier- | shogun: [WIP] fix unit test discovery on windows | 05:07 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 549d97a / src/shogun/base/Parallel.cpp: https://github.com/shogun-toolbox/shogun/commit/549d97a1c7cbc370b0284f47371b44cf895b678c | 05:07 |
shogun-notifier- | shogun: Fix assertation in Parallel::set_num_threads | 05:07 |
-!- travis-ci [~travis-ci@ec2-54-224-54-119.compute-1.amazonaws.com] has joined #shogun | 05:55 | |
travis-ci | it's Viktor Gal's turn to pay the next round of drinks for the massacre he caused in shogun-toolbox/shogun: https://travis-ci.org/shogun-toolbox/shogun/builds/152865513 | 05:55 |
-!- travis-ci [~travis-ci@ec2-54-224-54-119.compute-1.amazonaws.com] has left #shogun [] | 05:55 | |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 1e85d2f / appveyor.yml: https://github.com/shogun-toolbox/shogun/commit/1e85d2f55a1d1623257ea1975d11b54c38edc82a | 06:08 |
shogun-notifier- | shogun: Add appveyor.yml for windows CI | 06:08 |
shogun-notifier- | shogun: and where we go | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 7dec0b6 / CMakeLists.txt,cmake/external/MSIntTypes.cmake: https://github.com/shogun-toolbox/shogun/commit/7dec0b6efdc55d2abaaf59ef8b5a4eb41b23bff9 | 06:08 |
shogun-notifier- | shogun: Update MSIntTypes repo location | 06:08 |
shogun-notifier- | shogun: only use MSIntTypes when VS version < 11.0 | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 09fa117 / / (4 files): https://github.com/shogun-toolbox/shogun/commit/09fa117a81ed6c47f94ef51722976c8a44dcbfd0 | 06:08 |
shogun-notifier- | shogun: Add cmake detection for CxaDemangle | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * e319419 / CMakeLists.txt: https://github.com/shogun-toolbox/shogun/commit/e319419b3b1f4400312504d891d137f7d5813fe9 | 06:08 |
shogun-notifier- | shogun: Set properly the compiler flags for visual studio | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 252e2ba / src/shogun/classifier/vw/cache/VwNativeCacheReader.h: https://github.com/shogun-toolbox/shogun/commit/252e2ba9a47aa93fe9a9318ba6861e29328eb7d4 | 06:08 |
shogun-notifier- | shogun: Add portable packed attribute implementation | 06:08 |
shogun-notifier- | shogun: VwNativeCacheReader uses __attribute__((__packed__)) GNUC extension | 06:08 |
shogun-notifier- | shogun: this patch provides the equivalent implementation for MSVC | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * ac8b5e1 / src/shogun/ (3 files): https://github.com/shogun-toolbox/shogun/commit/ac8b5e1d1a198c34d73de445c141e4fd0f3a8a0e | 06:08 |
shogun-notifier- | shogun: Resolve using reserved variable names in MSVC | 06:08 |
shogun-notifier- | shogun: "far and near were built-in compiler keywords back in the 16-bit days." | 06:08 |
shogun-notifier- | shogun: undefining them when needed | 06:08 |
shogun-notifier- | shogun: [WIP] Fix macro va_args counter macros for MSVC | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * d45d097 / src/shogun/distance/Distance.cpp,src/shogun/kernel/Kernel.cpp: https://github.com/shogun-toolbox/shogun/commit/d45d097f33d581a03e4a77cb6177d6dc250ee83e | 06:08 |
shogun-notifier- | shogun: Properly guard with HAVE_PTHREAD all implementation that requires pthread | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * cff09d7 / src/shogun/io/streaming/InputParser.h,src/shogun/io/streaming/ParseBuffer.h: https://github.com/shogun-toolbox/shogun/commit/cff09d7d078257ee191614273aec123e1d399662 | 06:08 |
shogun-notifier- | shogun: Add c++11 based implementation for threading in InputParser and ParseBuffer | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * b835c30 / src/shogun/lib/Time.cpp,src/shogun/lib/Time.h: https://github.com/shogun-toolbox/shogun/commit/b835c30c133b1ee2ed2ae237fa4122fbcc950ed0 | 06:08 |
shogun-notifier- | shogun: Fix struct timeval definition for MSVC | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * df65fd2 / src/shogun/mathematics/ajd/FFDiag.cpp,src/shogun/mathematics/ajd/JediDiag.cpp: https://github.com/shogun-toolbox/shogun/commit/df65fd26212b7556563b4f48d6ec05aab01f5771 | 06:08 |
shogun-notifier- | shogun: Fix implementation where runtime variable was used for array size on the stack | 06:08 |
shogun-notifier- | shogun: use SGMatrix or SGVector instead | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 5b51290 / src/shogun/features/StringFeatures.cpp,src/shogun/io/SGIO.cpp: https://github.com/shogun-toolbox/shogun/commit/5b51290ffcd5c6146bbacb38511f97785c8cccc5 | 06:08 |
shogun-notifier- | shogun: Add MSVC implementation of directory listing to StringFeatures | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * ad647ba / src/shogun/lib/external/PMurHash.h: https://github.com/shogun-toolbox/shogun/commit/ad647baa55722b8c8a64ac1dffdc4f7079aad012 | 06:08 |
shogun-notifier- | shogun: Use uint32_t for MurMurHash3 when MSVC defines it | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 27e7d45 / src/shogun/io/SGIO.h: https://github.com/shogun-toolbox/shogun/commit/27e7d4542556a938bb234208c3c4dc2cd33ec651 | 06:08 |
shogun-notifier- | shogun: Use strncpy_s instead of strncpy when compiling with MSVC | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 38b95a3 / src/shogun/mathematics/linalg/internal/implementation/ (17 files): https://github.com/shogun-toolbox/shogun/commit/38b95a3bd32f39a4d545080442957cf3d57ae8ea | 06:08 |
shogun-notifier- | shogun: Replace enum with Backend in the linalg template args | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 69e6350 / appveyor.yml,tests/unit/CMakeLists.txt: https://github.com/shogun-toolbox/shogun/commit/69e6350c1638c4048a9e9c19a0d093a23c92104b | 06:08 |
shogun-notifier- | shogun: [WIP] fix unit test discovery on windows | 06:08 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * b298da1 / src/shogun/base/Parallel.cpp: https://github.com/shogun-toolbox/shogun/commit/b298da10cb2fc48f87fc9bf29f73ac65cfa026ae | 06:08 |
shogun-notifier- | shogun: Fix assertation in Parallel::set_num_threads | 06:08 |
-!- shogun-notifier- [~irker@7nn.de] has quit [Quit: transmission timeout] | 09:08 | |
-!- sanuj [~sanuj@117.204.245.188] has joined #shogun | 09:59 | |
-!- sanuj [~sanuj@117.204.245.188] has quit [Ping timeout: 252 seconds] | 10:14 | |
-!- sanuj [~sanuj@117.204.245.188] has joined #shogun | 11:23 | |
sanuj | wiking, do you know if it's possible to set a breakpoint in a ruby script while debugging using gdb? | 11:24 |
@wiking | sanuj, http://lmgtfy.com/?q=ruby+script+while+debugging# | 11:26 |
-!- travis-ci [~travis-ci@ec2-54-242-68-98.compute-1.amazonaws.com] has joined #shogun | 11:56 | |
travis-ci | it's Viktor Gal's turn to pay the next round of drinks for the massacre he caused in shogun-toolbox/shogun: https://travis-ci.org/shogun-toolbox/shogun/builds/152923077 | 11:56 |
-!- travis-ci [~travis-ci@ec2-54-242-68-98.compute-1.amazonaws.com] has left #shogun [] | 11:56 | |
sanuj | wiking, i had already tried those debuggers | 12:03 |
sanuj | they are not helping me narrow down the problem | 12:03 |
sanuj | i want to see what is wrong with swig generated wrappers | 12:03 |
sanuj | the bug is exactly like this one | 12:04 |
sanuj | http://stackoverflow.com/questions/15197131/ruby-and-swig-typeerror-cant-convert-nil-into-string | 12:04 |
@wiking | sanuj, have you tried #swig (oftc) or their mailing list? | 12:07 |
sanuj | wiking, shall i ask them on their mailing list? | 12:07 |
@wiking | idk | 12:08 |
sanuj | wiking, you are online on #swig? | 12:10 |
@wiking | i think so | 12:11 |
sanuj | kk | 12:11 |
-!- sanuj [~sanuj@117.204.245.188] has quit [Ping timeout: 264 seconds] | 12:52 | |
-!- sanuj [~sanuj@117.204.245.188] has joined #shogun | 12:53 | |
-!- shogun-notifier- [~irker@7nn.de] has joined #shogun | 13:04 | |
shogun-notifier- | shogun: Viktor Gal :feature/windows * f39bfcf / src/shogun/ (20 files): https://github.com/shogun-toolbox/shogun/commit/f39bfcf5e4f0203144aa64b67d1885238fa5e51f | 13:04 |
shogun-notifier- | shogun: Fix headers when compiling with MSVC | 13:04 |
shogun-notifier- | shogun: * dont include <unistd.h>, <sys/time.h>, <sys/mman.h> | 13:04 |
shogun-notifier- | shogun: * include <windows.h> in commons.h with NOMINMAX defined | 13:04 |
shogun-notifier- | shogun: * include <io.h> | 13:04 |
shogun-notifier- | shogun: * fix missing ssize_t definition | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * c62e642 / src/shogun/base/SGObject.h: https://github.com/shogun-toolbox/shogun/commit/c62e64284dff026cc129f097b67f4484cdcfe2b8 | 13:04 |
shogun-notifier- | shogun: [WIP] Fix macro va_args counter macros for MSVC | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 5c2681c / src/shogun/distance/Distance.cpp,src/shogun/kernel/Kernel.cpp: https://github.com/shogun-toolbox/shogun/commit/5c2681c2c5a3569878a2b599efdcc9f2d13d8b33 | 13:04 |
shogun-notifier- | shogun: Properly guard with HAVE_PTHREAD all implementation that requires pthread | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * e4d6eb3 / src/shogun/io/streaming/InputParser.h,src/shogun/io/streaming/ParseBuffer.h: https://github.com/shogun-toolbox/shogun/commit/e4d6eb321ddfbf2fcf24724750e2d9224b1c4cc9 | 13:04 |
shogun-notifier- | shogun: Add c++11 based implementation for threading in InputParser and ParseBuffer | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 31e0be4 / src/shogun/lib/Time.cpp,src/shogun/lib/Time.h: https://github.com/shogun-toolbox/shogun/commit/31e0be418ade116b57380486e2faf56b9368d1f3 | 13:04 |
shogun-notifier- | shogun: Fix struct timeval definition for MSVC | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * d3d7832 / src/shogun/lib/Signal.cpp,src/shogun/lib/Signal.h: https://github.com/shogun-toolbox/shogun/commit/d3d783202022aa114f8535069bce8a340fd0c17e | 13:04 |
shogun-notifier- | shogun: Add MSVC implementation to Signal class | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 286dbc6 / src/shogun/CMakeLists.txt: https://github.com/shogun-toolbox/shogun/commit/286dbc6505e6026963cd5e1c472abbd2302a2eff | 13:04 |
shogun-notifier- | shogun: Link libshogun with winmm when compilng with MSVC | 13:04 |
shogun-notifier- | shogun: required for timeGetTime | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 7426ed2 / examples/undocumented/libshogun/ (2 files): https://github.com/shogun-toolbox/shogun/commit/7426ed2f15c9a70a33f735ddd2d7bb3be5ccfe4a | 13:04 |
shogun-notifier- | shogun: Fix examples to compile with MSVC | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 3e96714 / / (9 files): https://github.com/shogun-toolbox/shogun/commit/3e96714f29408737936cf91b16da1bf4e057ca64 | 13:04 |
shogun-notifier- | shogun: Fix unit tests for MSVC | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 25789b8 / CMakeLists.txt,cmake/external/GoogleTestNMock.cmake: https://github.com/shogun-toolbox/shogun/commit/25789b86a024d27a001bcbd4bfd1494ea87d7366 | 13:04 |
shogun-notifier- | shogun: Fix unit test framework compiler flags | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * 578e709 / appveyor.yml,tests/unit/CMakeLists.txt: https://github.com/shogun-toolbox/shogun/commit/578e7090e7cbed789fb558f59b2f4a52492dc72c | 13:04 |
shogun-notifier- | shogun: [WIP] fix unit test discovery on windows | 13:04 |
shogun-notifier- | shogun: Viktor Gal :feature/windows * cca55bd / src/shogun/base/Parallel.cpp: https://github.com/shogun-toolbox/shogun/commit/cca55bd8e29ddfc31fe4865b3085db0214ff191a | 13:04 |
shogun-notifier- | shogun: Fix assertation in Parallel::set_num_threads | 13:04 |
-!- travis-ci [~travis-ci@ec2-54-242-68-98.compute-1.amazonaws.com] has joined #shogun | 13:51 | |
travis-ci | it's Viktor Gal's turn to pay the next round of drinks for the massacre he caused in shogun-toolbox/shogun: https://travis-ci.org/shogun-toolbox/shogun/builds/152937768 | 13:51 |
-!- travis-ci [~travis-ci@ec2-54-242-68-98.compute-1.amazonaws.com] has left #shogun [] | 13:51 | |
-!- sanuj [~sanuj@117.204.245.188] has quit [Ping timeout: 250 seconds] | 13:56 | |
-!- sanuj [~sanuj@117.204.245.188] has joined #shogun | 14:35 | |
sanuj | lisitsyn, hey | 14:35 |
sanuj | Saurabh7, hey | 14:40 |
-!- mizari [~mizari@95-174-213-100.nts.su] has joined #shogun | 14:41 | |
Saurabh7 | sanuj: yo | 14:46 |
sanuj | Saurabh7, how are you planning to submit your code to google? | 14:46 |
Saurabh7 | sanuj: uhm not sure, mayb some filter on PRs | 14:47 |
sanuj | okay | 14:47 |
@wiking | Saurabh7, are you by any chance here? | 15:29 |
-!- sanuj [~sanuj@117.204.245.188] has quit [Ping timeout: 252 seconds] | 15:47 | |
-!- shogun-notifier- [~irker@7nn.de] has quit [Quit: transmission timeout] | 16:04 | |
-!- sanuj [~sanuj@117.204.245.188] has joined #shogun | 16:45 | |
-!- mizari [~mizari@95-174-213-100.nts.su] has quit [Read error: Connection reset by peer] | 18:04 | |
-!- mizari [~mizari@95-174-213-100.nts.su] has joined #shogun | 18:19 | |
-!- mizari [~mizari@95-174-213-100.nts.su] has quit [Quit: Leaving] | 19:21 | |
CaBa | RealFeatures is CDenseFeatures<float64_t>? | 19:50 |
lisitsyn | yes | 19:56 |
CaBa | in the example below, where it says 'shogun will now own the matrix created' - what does that mean? 'matrix' is not a pointer that could be free. will SG call free_data() of the SGMatrix object once the 'features' object is SG_UNREFed? or what does 'own' imply here? | 20:01 |
CaBa | http://www.shogun-toolbox.org/doc/en/latest/developer_tutorial.html | 20:01 |
CaBa | lisitsyn: thanks | 20:01 |
lisitsyn | CaBa: I think that's rather legacy | 20:05 |
lisitsyn | it was raw pointer long ago | 20:06 |
sanuj | lisitsyn, hey | 20:10 |
lisitsyn | sanuj: hey | 20:12 |
sanuj | lisitsyn, so i'll give you links that i'll be submitting to google tomorrow | 20:13 |
sanuj | you can review them? | 20:13 |
lisitsyn | yeah probably | 20:14 |
sanuj | lisitsyn, 23rd is the last date | 20:15 |
lisitsyn | what links? | 20:15 |
lisitsyn | source code? | 20:15 |
sanuj | PRs | 20:16 |
lisitsyn | ok | 20:16 |
sanuj | or is there a better way to submit code? | 20:16 |
sanuj | i read this from their guidelines | 20:16 |
sanuj | and they also wanted me to discuss this with my mentors | 20:16 |
lisitsyn | no idea, you've got to follow their guides | 20:17 |
sanuj | okay | 20:18 |
CaBa | lisitsyn: ok, so the objects like SGString or SGMatrix, which are usually passed by value, aren't touched by shoguns garbage collection? | 20:26 |
lisitsyn | CaBa: they are SGReferencedData | 20:26 |
lisitsyn | they are refcounted, copy ctor +1, dtor -1 | 20:26 |
lisitsyn | once nobody is using it, it is deleted | 20:27 |
CaBa | lisitsyn: so in SGString for example, the 'char * string' member of that would be freed upon refcount==0? | 20:27 |
lisitsyn | CaBa: not SGString but SGVector and SGMatrix | 20:28 |
CaBa | O.O | 20:28 |
lisitsyn | SGString is always copied | 20:28 |
CaBa | lisitsyn: confusing. is all that memory logic documented somewhere. | 20:29 |
CaBa | s/.$/?/ | 20:29 |
lisitsyn | CaBa: somewhere in code I guess | 20:31 |
lisitsyn | not sure | 20:31 |
CaBa | lisitsyn: upon construction, the object has refcount 1? | 20:33 |
lisitsyn | it is zero by default | 20:33 |
CaBa | lisitsyn: so if i create an SGVector, pass it to shogun by value, it is copied (0->1), shogun object dies and deconstructs the copy (1->0), my original version is now an empty SGVector? | 20:34 |
lisitsyn | yeah but this doesn't happen | 20:37 |
lisitsyn | auto x = SGVector(); | 20:37 |
lisitsyn | here x will have refcount=1 | 20:37 |
lisitsyn | because of once happened copy | 20:37 |
CaBa | oh | 20:39 |
CaBa | my incomplete knowledge of c++ then :P | 20:39 |
-!- Hieronymous [~sudarshan@122.169.143.61] has joined #shogun | 20:41 | |
CaBa | lisitsyn: hm. the copy constructor isn't called in your example | 20:43 |
CaBa | lisitsyn: also why would you write 'auto x SGVector();' instead of 'SGVector x;'? | 20:43 |
lisitsyn | CaBa: either operator= if it is implemented or copy ctor | 20:43 |
-!- sanuj [~sanuj@117.204.245.188] has quit [Quit: Leaving] | 20:43 | |
lisitsyn | that's fine as well | 20:44 |
CaBa | lisitsyn: so in any case refcount is +1'ed? | 20:46 |
lisitsyn | yeah except dtor | 20:46 |
CaBa | lisitsyn: is that any different for pointers? if i use 'SGVector * x = new SGVector()'? | 20:55 |
lisitsyn | CaBa: you can't forget deleting it | 21:09 |
lisitsyn | it is what you easy do with pointers | 21:10 |
CaBa | lisitsyn: your example above - it doesn't involve the assignment operator or the copy operator... i still don't get how it get's its refcount upped ;) | 21:12 |
CaBa | copy ctor even... | 21:12 |
lisitsyn | auto x = SGVector(); | 21:12 |
lisitsyn | 1. SGVector x is constructed | 21:12 |
lisitsyn | 2. rhs SGVector is constructed | 21:12 |
lisitsyn | 3. x is assigned to the other one | 21:13 |
lisitsyn | when assignment happens operator= is called | 21:13 |
lisitsyn | if it is not here, copy ctor is called | 21:13 |
CaBa | lisitsyn: https://ideone.com/Gtmr8x | 21:13 |
lisitsyn | in this case it looks optimized out | 21:14 |
lisitsyn | not sure | 21:15 |
CaBa | lisitsyn: compiler can't optimize out printing a message | 21:15 |
lisitsyn | sure | 21:15 |
lisitsyn | I mean auto x = Example(); is reduced to Example x; | 21:16 |
CaBa | 20:42:28 < lisitsyn> that's fine as well | 21:17 |
CaBa | ;-) | 21:17 |
lisitsyn | yeah what's the question anyway? | 21:18 |
CaBa | lisitsyn: i don't understand where the +1 happens upon 'SGVector foo;' | 21:18 |
lisitsyn | it doesn't happen | 21:18 |
lisitsyn | it would happen if you copy it somewhere | 21:19 |
CaBa | SGVector<char> vec; | 21:19 |
CaBa | std::cout << "REF COUNT " << vec.ref_count() << std::endl; | 21:19 |
CaBa | this yields '1' | 21:19 |
lisitsyn | ah | 21:20 |
lisitsyn | I missed the line | 21:20 |
lisitsyn | it is referenced on creation once | 21:20 |
lisitsyn | in SGReferencedData ctor | 21:20 |
CaBa | lisitsyn: that's where i was looking, too, but there it says 'm_refcount = new RefCount(0);' | 21:21 |
CaBa | ah... | 21:21 |
CaBa | and then comes ref() | 21:21 |
lisitsyn | ref(); | 21:21 |
CaBa | .... | 21:21 |
CaBa | lisitsyn: i see... so point is that everything that is passed through pointers and not by value will not undergo the ++ref - and therefore be destroyed once the object that got the pointer is UNREF'ed... | 21:25 |
CaBa | so wherever something in shogun takes something by value, it won't eat up passed objects upon destruction, when a pointer get's passed i need to REF myself before if i intend to use the object afterwards? | 21:27 |
lisitsyn | CaBa: yeah if you need it, it is guaranteed that it will be available | 21:28 |
CaBa | lisitsyn: thanks for shedding some light | 21:32 |
lisitsyn | you're welcome | 21:32 |
-!- Hieronymous [~sudarshan@122.169.143.61] has quit [Remote host closed the connection] | 22:53 | |
--- Log closed Thu Aug 18 00:00:10 2016 |
Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!