본문 바로가기

전체 글

[ Boost ] Boost.thread #1 Boost 목록 링크 : http://tingcobell.tistory.com/295 boost.thread는 C++에서 멀티스테르에서 안정적인 데이터를 공유할 수 있습니다. boost::thread 라이브러리는 이식성, 유연성에을 고려하여 최대한 효율적으로 구현된 라이브러리입니다. 날짜/시간과 같은 테스크을 조정하고 파일 시스템 인터페이스, 네트워킹, 원자적 프로그래밍 등 상호간의 조율을 합니다. 메뉴얼을 읽고 있는데 boost로 구현한 thread을 처음 사용하는 것이라서 요목조목 구현 및 테스트를 해보려고 합니다. 스레드에 간단한 다이어그램을 그린다면 다음과 같이 구성이 될것 입니다. 기본 모델 1. boost::thread을 선언( 다시말하면 스래드 선언? 이정도로 봐야 정확합니다. ) 2. bo.. 더보기
[ Boost ] Boost.array 관련 예제 만들어보기 Boost 목록 링크 : http://tingcobell.tistory.com/295 링크 : http://tingcobell.tistory.com/302 시간관련 측정함수인 boost::timer을 이용하여 결과를 도출하려고 하였으나 제가 사용을 못하는건지 아니면 이녀석에 대해 제가 정확히 파악을 하지 못하는건지 잘 모르겠지만, 결과가 0으로만 산출되는 바람에 제가 주로 사용하고 있는 apr라이브러리를 이용하여 시간을 측정하였습니다. 관련된 Reference에 정의된 내용을 가지고 예제를 만들어봤습니다. #include #include #include //#include #include #define MAX_COUNT 1000 int main() { boost::array array_test; std:.. 더보기
[ Boost ] Boost.Array Description Boost.array는 iterator을 제공하고 있습니다. 1. array Iterator Support iterator begin(); const_iterator begin() const; Returns : iterator for the first element Throws : will not throw iterator end(); const_iterator end() const; Returns : iterator for position after the last element Throws : will not throw 2. array reverse iterator support reverse_iterator rbegin(); const_reverse_iterator rbegin() const; Re.. 더보기
[ Boost ] Ref. array.hpp /* The following code declares class array, * an STL container (as wrapper) for arrays of constant size. * * See * http://www.boost.org/libs/array/ * for documentation. * * The original author site is at: http://www.josuttis.com/ * * (C) Copyright Nicolai M. Josuttis 2001. * * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://.. 더보기
[ Boost ] Boost.Array 정리 Boost 목록 링크 : http://tingcobell.tistory.com/295 ㅇ 내용 boost Ref.에 의하면 가변 크기의 배열은 std::vector or std::vector 의 동적인 배열을 사용할 수 있습니다. 하지만 일반적으로 알고 있는 가변의 크기는 오버헤드가 있기 마련이죠. 그래서 정적인 배열 고정크기를 정해 놓고 개발을 하게 됩니다. 배열이 컨테이너가 아니기에 불편함을 이루 말할 수 없습니다. int array_test[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9}; int array_test[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9}; boost 라이브러리에서 제공하고 있는 boost::array 라이브러리를 사용하여 테스트 해보겠습니다. 아래.. 더보기
[ 반려견 ] 교육방법 반려견 교육방법 동영상으로 보니깐 와 하고 감탄이 절로 나오네요.. 까미엄마의 교육법.. 최고에요..+_+ 진짜 대단하는 생각뿐이 안드네요. ㅎㅎ 링크 : http://blog.naver.com/aromi9501?Redirect=Log&logNo=20027665982 더보기
[ Boost ] boost.foreach 간단한 예제-2 Boost 목록 링크 : http://tingcobell.tistory.com/295 Boost_foreach 매크로을 보니깐 간단한 코드가 있어 테스트 해보았습니다. 하지만 수행시간이 상당히 느리네요. 간단한 셈플로 그냥 이렇게 쓰는구나라고만 생각하시면 될것 같습니다. #include #include #include //#include //#include #include #include int main() { std::vector testVector; for( int i = 0 ; i < 10; i ++ ) testVector.push_back( i ); std::vector matrix_int; matrix_int.push_back( testVector); BOOST_FOREACH( std::vect.. 더보기
[ Boost ] 간단한 예제 Boost 목록 링크 : http://tingcobell.tistory.com/295 공부하면서 링크를 추가적으로 계속 업데이트 하겠습니다. * accumulators * any * array 링크 : http://tingcobell.tistory.com/300 링크 : http://tingcobell.tistory.com/302 링크 : http://tingcobell.tistory.com/303 * asio 링크 : http://tingcobell.tistory.com/316 링크 : http://tingcobell.tistory.com/317 링크 : * bind 링크 : http://tingcobell.tistory.com/313 링크 : http://tingcobell.tistory.com/31.. 더보기