On Friday, 20 January 2017 at 14:22:23 UTC, Adam D. Ruppe wrote:
On Friday, 20 January 2017 at 07:50:23 UTC, Jacob Carlborg
wrote:
That doesn't work well with a unit test framework that want to
catch assertions to be able to continue with other tests.
I'd suggest writing a new assert handler f
On Saturday, 21 January 2017 at 00:03:11 UTC, Xavier Bigand wrote:
std::numeric_limits::lowest() is describe as "A finite value
x such that there is no other finite value y
* where y < x."
According to what I presume that definition means ("no other
finite value" means "no other finit
On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote:
When std.experimental.allocator was created, I was under the
impression it was meant to be used to make containers. But
since allocate() returns void[], casts are required before
using that memory, which is unsafe.
Is my only option
On Saturday, 21 January 2017 at 09:56:29 UTC, ZombineDev wrote:
On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote:
When std.experimental.allocator was created, I was under the
impression it was meant to be used to make containers. But
since allocate() returns void[], casts are require
On 2017-01-21 00:52, 岩倉 澪 wrote:
This has already been fixed? Is this fix in a stable release yet? I
might not be on the latest version...
It's fixed in DMD, _not_ in RDMD.
--
/Jacob Carlborg
On Saturday, 14 January 2017 at 15:30:42 UTC, Rainer Schuetze
wrote:
In addition, you need to lookup the pool anyway to figure out
if the pointer points to non-managed memory (stack, global
data, malloc'd memory).
Makes me wonder about a GC'd language where each pointer is
actually a member o
On Sat, 21 Jan 2017 04:01:06 +, bitwise wrote:
> On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote:
>> [...]
>
> I can see that 'TypedAllocator' exists, but with a different interface
> than the rest of the allocators. Why wouldn't all allocators just have a
> common interface?
Typ
Le 21/01/2017 à 10:54, John Colvin a écrit :
On Saturday, 21 January 2017 at 00:03:11 UTC, Xavier Bigand wrote:
std::numeric_limits::lowest() is describe as "A finite value x such
that there is no other finite value y
* where y < x."
According to what I presume that definition means ("
On 01/21/2017 01:06 AM, Eugene Wissner wrote:
On Saturday, 21 January 2017 at 05:52:49 UTC, bitwise wrote:
I hadn't noticed this, but I immediately see two problems:
1) there is no alignedDeallocate() which is needed because aligned
allocators usually prepend metadata containing a pointer to th
On 01/20/2017 09:15 AM, Russel Winder via Digitalmars-d wrote:
On Fri, 2017-01-20 at 07:10 +, Andrei Alexandrescu via Digitalmars-
d wrote:
[…]
It would be worth it. I think a fix takes some thinking because if I
remember correctly the compiler does not accept files without an
extension as
On 01/20/2017 04:26 AM, Ethan Watson wrote:
Landed in my inbox while I was on holiday in Australia (why did I leave
it three and a half years between visits jeez never do that again you
fool).
http://imgur.com/a/I6GrF
In summary:
* 4.5 out of 5 audience rating. Average was 4.22.
* Head count o
On Saturday, 21 January 2017 at 10:15:46 UTC, ZombineDev wrote:
On Saturday, 21 January 2017 at 09:56:29 UTC, ZombineDev wrote:
On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote:
When std.experimental.allocator was created, I was under the
impression it was meant to be used to make co
On Saturday, 21 January 2017 at 16:28:16 UTC, Andrei Alexandrescu
wrote:
alignedAllocate provides access to OS/clib-provided primitives
for aligned allocation. Those don't require a special
deallocation function, see e.g.
http://en.cppreference.com/w/c/memory/aligned_alloc. -- Andrei
This mak
On 01/21/2017 12:14 PM, bitwise wrote:
On Saturday, 21 January 2017 at 16:28:16 UTC, Andrei Alexandrescu wrote:
alignedAllocate provides access to OS/clib-provided primitives for
aligned allocation. Those don't require a special deallocation
function, see e.g.
http://en.cppreference.com/w/c/memo
On Saturday, 14 January 2017 at 04:37:01 UTC, Chris Wright wrote:
Unfortunately, given an interior pointer, you can't identify
the base of its heap object in constant time.
1. Split the heap in chunk of size n being a power of 2, say 4M.
Align them 4M.
2. Find the chunk an alloc is part of in
On Saturday, 21 January 2017 at 16:32:36 UTC, Andrei Alexandrescu
wrote:
Congratulations, that looks like a very good performance! Could
you please explain a bit how the Google Slides feature you
mentioned works? -- Andrei
The core functionality is that a web link is provided that allows
peop
On Saturday, 21 January 2017 at 17:26:35 UTC, Andrei Alexandrescu
wrote:
On 01/21/2017 12:14 PM, bitwise wrote:
On Saturday, 21 January 2017 at 16:28:16 UTC, Andrei
Alexandrescu wrote:
alignedAllocate provides access to OS/clib-provided
primitives for
aligned allocation. Those don't require a
On Sunday, 15 January 2017 at 05:17:10 UTC, Adam D. Ruppe wrote:
On Sunday, 15 January 2017 at 04:11:06 UTC, Craig Dillabaugh
wrote:
I've been trying to find something on this, but haven't yet,
but I am not sure if website work would be considered
appropriate.
The website is still a program,
On 1/21/17 5:44 PM, bitwise wrote:
About alignedMalloc:
In C++ for example, I may want to use a vector full some SIMD type:
class alignas(16) Vec4 {
union {
struct { float x, y, z, w; };
__m128 m;
};
};
std::vector points = { ... };
In C++ however, 'new' does not respe
On Sat, 21 Jan 2017 22:44:49 +, bitwise wrote:
> So I use a custom aligned allocator:
>
> template
> class AlignedAllocator {
> T* allocate(size_type n) {
> return (T*)_aligned_malloc(ALIGN, n * sizeof(T));
> }
> };
>
> SIMD operations(aligned load and store) can now safel
On Sunday, 22 January 2017 at 00:13:10 UTC, Chris Wright wrote:
On Sat, 21 Jan 2017 22:44:49 +, bitwise wrote:
So I use a custom aligned allocator:
template
class AlignedAllocator {
T* allocate(size_type n) {
return (T*)_aligned_malloc(ALIGN, n * sizeof(T));
}
};
SIMD o
On Sun, 22 Jan 2017 00:53:45 +, bitwise wrote:
> I understand this, but I've given a solid example which supports the
> former, and haven't seen a counter example which supports the latter.
Because examples that are easy to generate are small and small examples
don't have coarse-grained anyth
On Saturday, 21 January 2017 at 23:24:52 UTC, Andrei Alexandrescu
wrote:
On 1/21/17 5:44 PM, bitwise wrote:
About alignedMalloc:
In C++ for example, I may want to use a vector full some SIMD
type:
class alignas(16) Vec4 {
union {
struct { float x, y, z, w; };
__m128 m;
On Sunday, 22 January 2017 at 01:02:09 UTC, Chris Wright wrote:
On Sun, 22 Jan 2017 00:53:45 +, bitwise wrote:
I understand this, but I've given a solid example which
supports the former, and haven't seen a counter example which
supports the latter.
Because examples that are easy to gener
I'm not sure whether this should be counted as a bug, but I ran
into it and thought it deserved mentioning. I've been testing
this with DMD on Windows.
I wrote this function to support parsing of strings as floating
point values:
https://github.com/pineapplemachine/mach.d/blob/master/mach/mat
On Sunday, 22 January 2017 at 01:54:59 UTC, pineapple wrote:
When you write `real x = 0.0005;` x in fact represets a value
of about
0.00050032187251995663412884596255025826394.
This is a about 3.2 * 10^-23 more than 0.0005.
The output of my function in this case was about
0.0
On Saturday, 21 January 2017 at 23:24:52 UTC, Andrei Alexandrescu
wrote:
Andrei
Anyways, design opinions aside, I would be satisfied if an
aligned allocator were included in std.allocators that provided
aligned heap memory using allocate()/deallocate(). The rest is
just details with no pract
On Saturday, 21 January 2017 at 17:42:46 UTC, deadalnix wrote:
1. Split the heap in chunk of size n being a power of 2, say
4M. Align them 4M.
2. Find the chunk an alloc is part of in O(1) bu masking the
lower bits (22 bits to mask in our 4M case).
3. Have a table of page descriptor in the chu
On Sun, 22 Jan 2017 05:02:43 +, Araq wrote:
> It's an O(1) that requires a hash table lookup in general because
> allocations can exceed the chunk size and so you cannot just mask the
> pointer and look at the chunk header because it might not be a chunk
> header at all. Know any production GCs
On Saturday, 21 January 2017 at 05:59:32 UTC, Stefan Koch wrote:
On Friday, 20 January 2017 at 19:08:28 UTC, Stefan Koch wrote:
Druntime and phobos broke, the reason being that,
I did test against an outdated version of druntime/phobos.
I am working on getting them to compile again.
Adding feat
On Sunday, 22 January 2017 at 06:28:35 UTC, Chris Wright wrote:
On Sun, 22 Jan 2017 05:02:43 +, Araq wrote:
It's an O(1) that requires a hash table lookup in general
because allocations can exceed the chunk size and so you
cannot just mask the pointer and look at the chunk header
because i
31 matches
Mail list logo