Re: Special integer operations

2019-10-28 Thread Ali Çehreli via Digitalmars-d-learn
On 10/28/2019 03:20 PM, IGotD- wrote: I'm trying to find if D has any built in special integer operations like bit reverse, population count, count leading zeroes, count trailing zeroes. https://dlang.org/phobos/core_bitop.html Ali

Special integer operations

2019-10-28 Thread IGotD- via Digitalmars-d-learn
I'm trying to find if D has any built in special integer operations like bit reverse, population count, count leading zeroes, count trailing zeroes. Many ISAs have dedicated instructions for these kinds of operations. I haven't found any of these in the documentation, either implemented as

Re: Running unittests of a module with -betterC

2019-10-28 Thread Daniel Kozak via Digitalmars-d-learn
On Mon, Oct 28, 2019 at 9:40 AM Per Nordlöw via Digitalmars-d-learn wrote: > > Is it possible to run the unittests of a module with -betterC like > > dmd -D -g -main -unittest -betterC f.d > > ? > > This currently errors as > > /usr/include/dmd/druntime/import/core/internal/entrypoint.d:34:

Running unittests of a module with -betterC

2019-10-28 Thread Per Nordlöw via Digitalmars-d-learn
Is it possible to run the unittests of a module with -betterC like dmd -D -g -main -unittest -betterC f.d ? This currently errors as /usr/include/dmd/druntime/import/core/internal/entrypoint.d:34: error: undefined reference to '_d_run_main' for an empty file f.d