This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #include <iostream> | |
| #include <atomic> | |
| #include <memory> | |
| namespace my { | |
| std::atomic_int g_memory_used{ 0 }; | |
| template <typename T> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <boost/system/error_code.hpp> | |
| #include <boost/asio/async_result.hpp> | |
| #include <boost/asio/detail/handler_type_requirements.hpp> | |
| template< | |
| class ReadHandler> | |
| BOOST_ASIO_INITFN_RESULT_TYPE( | |
| ReadHandler, void(boost::system::error_code, std::size_t)) | |
| async_read(ReadHandler&& handler) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <sstream> | |
| #include <functional> | |
| #include <boost/optional.hpp> | |
| #include <boost/asio/ts/internet.hpp> | |
| #include <boost/asio/ts/buffer.hpp> | |
| #include <boost/asio.hpp> | |
| // #define NETWORK_TS_ENABLED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| scons arch=arm64-v8a extra_cxx_flags="-fPIC" benchmark_tests=0 validation_tests=0 opencl=1 embed_kernels=1 neon=1 | |
| ./b2 link=static cxxflags=-fPIC --with-filesystem --with-test --with-log --with-program_options | |
| ./configure --host=arm-linux CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ --with-protoc=/usr/local/bin/protoc --prefix=/usr/local/arm_proto | |
| CXX=aarch64-linux-gnu-g++ cmake -DARMCOMPUTE_ROOT=/ComputeLibrary -DARMCOMPUTE_BUILD_DIR=/ComputeLibrary/build -DBOOST_ROOT=/boost_1_64_0 -DTF_GENERATED_SOURCES=/usr/local -DBUILD_TF_PARSER=1 -DPROTOBUF_ROOT=/usr/local/arm_proto -DARMCOMPUTENEON=1 -DARMCOMPUTECL=1 .. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.9.0"> </script> | |
| <script> | |
| const model = tf.sequential(); | |
| model.add(tf.layers.dense({ units: 1, inputShape: [1] })); | |
| model.compile({ loss: 'meanSquaredError', optimizer: 'sgd' }); | |
| const xs = tf.tensor2d([1, 2, 3, 4], [4, 1]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <type_traits> | |
| #include <iostream> | |
| #include <experimental/coroutine> | |
| template<typename T> | |
| struct coreturn { | |
| struct promise; | |
| friend struct promise; | |
| using handle_type = std::experimental::coroutine_handle<promise>; | |
| coreturn(const coreturn &) = delete; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <type_traits> | |
| #include <iostream> | |
| #include <experimental/coroutine> | |
| struct generator { | |
| struct promise_type { | |
| int current_value; | |
| promise_type() { | |
| std::cout << "Promise created" << std::endl; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <type_traits> | |
| #include <iostream> | |
| #include <experimental/coroutine> | |
| struct generator { | |
| struct promise_type { | |
| int current_value; | |
| promise_type() { | |
| std::cout << "Promise created" << std::endl; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <type_traits> | |
| #include <iostream> | |
| #include <experimental/coroutine> | |
| template<typename T> | |
| struct coreturn { | |
| struct promise; | |
| friend struct promise; | |
| using handle_type = std::experimental::coroutine_handle<promise>; | |
| coreturn(const coreturn &) = delete; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // MIT License | |
| // Copyright (c) 2017 Poom Malakul Na Ayudhya | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: |
NewerOlder