Skip to content

Latest commit

 

History

History
88 lines (58 loc) · 3.89 KB

README.md

File metadata and controls

88 lines (58 loc) · 3.89 KB

ori project readme

The Google Concurrency Library (GCL) is an attempt to export several internal C++ Google concurrency libraries in a form that the C++ standard committee may accept for TR2.

cd to the directory into which you've checked out the Google Concurrency Library, and run:

$ make $ make test

make clean will take you back to a pristine checkout.


new readme

I am trying make this project used on nowaday c++ development, since the original project is already archieve. Some function aren't implement as before. It's quite hard for me to make them done.

  • master branch: this work
  • disable_warning branch: remain project as close to origin as possible. but able to compile (disable warning as error).

feature

  1. able to compile core,test by gcc11
  2. cmake support

usage

  1. compile sample

    • dedup: install openssl.
      • call make dedup to build this example.
    • blackscholes: source code seems not yet complete.
  2. install by sudo make install

    • After installed, for any project want to use this lib, plz add following command in your cmake.

      •     find_package(gcl CONFIG REQUIRED)
            target_link_libraries(${your_target} gcl::goocon)
  3. install by conan

todo

log

for make

  1. error: dynamic exception specifications are deprecated in C++11 [-Werror=deprecated]
  1. error: catching polymorphic type ‘class std::invalid_argument’ by value [-Werror=catch-value=]
  1. error: moving a local object in a return statement prevents copy elision [-Werror=pessimizing-move]
  1. error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
  1. error: result of ‘(2 << 31)’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=]
  • arr[j] = (double)random() / (double)((2 << 31) - 1); --> arr[j] = (double)random() / (double)(((unsigned long int)2 << 31) - 1);

for make test

all the error from gtest inlined from ‘const char* testing::internal::posix::StrNCpy(char*, const char*, size_t)’ at ../third_party/googletest/include/gtest/internal/gtest-port.h:1610:17,

  1. error: ‘char*__builtin_strncpy(char*, const char*, long unsigned int)’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] gtest-port-arch.h
  2. Teaching googletest How to Print Your Values
  3. map_reduce_test.cc, error: ‘class gcl::queue_wrapper<gcl::buffer_queue<int> >’ has no member named ‘begin’ , mr.run(input_wrap.begin(), input_wrap.end());
  4. move counter_test.cc, dynarray_test.cc, queue_pref_test.cc to gtest, no need main() function.