| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(recommendation), update .clang* settings, recommend llvm-clang 16+
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gfxbox2 and certain Jogl of mine classes to jau::math::**
Chosen CamelCase (PascalCase) for class types, differing from gfxbox2.
Status:
- Compile clean
- Tests
-- test_math_float.cpp: Covers epsilon/zero/equal/compare/IEC559 of float_math.hpp
-- test_math_vec.cpp: Covers Vec2f + Vec3f (TODO)
-- TODO: Mat4f, Quaternion, Frustum, ...
|
|
|
|
| |
{add,sub,mul}_overflow(); Add unit tests (test_int_math.cpp)
|
|
|
|
|
|
| |
line to have same CXX version being used with parent
A parent's project CMAKE_CXX_STANDARD will not be propagated to a add_subdir(jaulib) scope!
|
|
|
|
| |
as documented in README
|
| |
|
| |
|
| |
|
|
|
|
| |
scripts/build.sh), simple lint fixes.
|
| |
|
|
|
|
|
|
| |
finite-state-machine (FSM), aka `endlicher automat` (EA)
Salvaged my code from July 1992 ;-)
|
|
|
|
| |
positive '-Werror=stringop-overflow=' using ::explicit_bzero(..)
|
|
|
|
|
|
| |
junit.jar
Notable: On Alpine Linux the hamcrest-all.jar had to be manually provided (couldn't find in main + custom repo)
|
| |
|
| |
|
|
|
|
| |
Linux distributions like Alpine/musl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(footprint + performance)
Keep orig Runtime Polymorphic as `test/function2.hpp` for comparison and review.
delegate_t<R(A...)> allows fast path target function invocation.
This static polymorphous object, delegates invocation specific user template-type data and callbacks
and allows to:
- be maintained within function<R(A...)> instance as a member
- avoiding need for dynamic polymorphism, i.e. heap allocated specialization referenced by base type
- hence supporting good cache performance
- avoid using virtual function table indirection
- utilize constexpr inline for function invocation (callbacks)
Impact:
- Memory footprint reduced (64bit)
- lambda, member: 64 -> 48 bytes, i.e. 25.00% less size
- capval, capref: 56 -> 48 bytes, i.e. 14.29% less size
- Performance (linux-arm64, raspi4, gcc, mean @ 600 samples):
- member_jaufunc: 7.34998 -> 5.3406 ms, i.e. 27.34% perf. gain
- becoming faster than member_stdbind_unspec
- lambda_jaufunc: 6.89633 -> 5.52684 ms, i.e. 19.86% perf. gain
- aligning most trivial-types to similar performance
- Performance differences on linux-amd64 high-perf machine
- Less significant than linux-arm64
- Probably due to better CPU caching, memory access, branch prediction, etc.
- member_jaufunc: 1.880 -> 1.848 ms, i.e. ~2% perf. gain (too small)
- lambda_jaufunc: 1.871 -> 1.851 ms, i.e. ~1% perf. gain (too small)
- Lines of code incl. comments:
- From 1287 -> 1674 lines, i.e. 30% added lines of code
- Added code used for manual static polymorphism, see above.
- Performance methodology
- New code test
- nice -20 ./test_functional2_perf --benchmark-samples 600
- Old code test
- nice -20 ./test_functional1_perf --benchmark-samples 600
+++
Optimization of func::member_target_t<...> using `gcc`
Utilizing GCC C++ Extension: Pointer to Member Function (PMF) Conversion to function pointer
- Reduces function pointer size, i.e. PMF 16 (total 24) -> function 8 (total 16)
- Removes vtable lookup at invocation (performance)
- Pass object this pointer to function as 1st argument
- See [GCC PMF Conversion](https://gcc.gnu.org/onlinedocs/gcc/Bound-member-functions.html#Bound-member-functions)
|
|
|
|
|
|
|
|
|
|
| |
function size accessible (and show in toString()
Also, to avoid any template type deduction error,
have the internally used `function(std::shared_ptr<target_type> _funcPtr) noexcept`
made explicit as `explicit function(const void* dummy, std::shared_ptr<target_type> _funcPtr) noexcept`
Adopted test_functional01.cpp and test_functional_perf.hpp
|
|
|
|
| |
target_t::delegate; Add function ctor for all types incl. simple lambda assignment; Add perf test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
template definition and default c++ naming scheme (function_def.hpp -> functional.hpp)
Changes
- Instead of FunctionDef<R, A1, A2> -> function<R(A1, A2)>
- Added support for void return type
- C++ naming scheme
- Enhance unit tests a little.
Examples:
- jau::function<bool(int)> func = jau::bind_member(&i1, &MyClass::m_func1);
- jau::function<void(int)> func = jau::bind_member(&il, &MyClass::m_func2);
- ...
|
|
|
|
| |
`jau::codec::base` and Java `org.jau.util.BaseCodec`
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Build scripts
- setup-machine-arch.sh
- set os_name { 'linux' or 'freebsd' }
- skip syslibdir for non linux
- be quite if given arg "-quiet"
- Set JAVA_HOME (if not done yet)
- Set JUNIT_CP (if not done yet)
- adopted all build/test scripts
C++ compilation:
- drop libatomic on all non Linux OS
- Set SYS_INCLUDE_DIRS w/ FreeBSD += /usr/local/include, use it in compilation
- FreeBSD: Set CMAKE_SYSTEM_PREFIX_PATH={/usr;/usr/local}
- Use find_library() for LIBCURL_LIBNAME and LIBUNWIND_LIBNAME w/ REQUIRED if selected
- Test: ownership_fix_tag: Use group 44(video) as defined in FreeBSD, Debian and Ubuntu
- use 'chgrp -f' to not complain on errors, continue build
OS/C++ file locations:
- mini_httpd
Java file locations:
- openjdk
- junit4 + hamcrest
- IOUtil.getExeTestShellCode(): FreeBSD uses /bin/test as /bin/true is n/a (for executable temp jar dir, i.e. fat jars)
|
|
|
|
| |
`TestsudoFileUtils02.java`; API-doc: Detail mount/umount capabilities (alt to sudo)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`test_bytestream01`; Refine ByteInStream*.java mapping ...
- Move ByteInStream.create() -> NioUtils.to_ByteInStream()
- Added ByteInStream.closeStream() allowing to close the underlying stream w/o disposing native instance as with close()
- ByteInStream.read() returns 'int' for length since all is based on pinned byte arrays anyways
- Added NioUtils.read_stream() with StreamConsumer type similar as with C++ helper.
- Added JauUtils for basic output support for tests
- TestByteStream01 mimicks native code flow 100%
|
|
|
|
| |
std::move() a std::string w/o copy, clang >= 11
|
|
|
|
| |
as user or as root via sudo; After setup mount_image() and umount() as well as copy-test can be called as user
|
|
|
|
| |
'-DTEST_WITH_SUDO=ON' as it requires `root` permissions
|
| |
|
| |
|
|
|
|
| |
dependencies w/o using it
|
| |
|
| |
|
| |
|
|
|
|
| |
removal warnings
|
|
|
|
| |
(safe)
|
| |
|
| |
|