On Tuesday, 22 December 2015 at 00:21:16 UTC, Jay Norwood wrote:
I'm trying to determine if the debugger autocompletion would be useful in combination with ndslice. I find that using visualD I get offered no completion to select core_ctr or epu_ctr where epu_ctr is used in the writeln below.

I take it this either means that there is some basic limitation in the debug info, or else VisualD just punts after some number of array subscripts.

The code builds and executes correctly ... but I was hoping the debugger completion would help out with an exploratory mode using compiled code.

import std.stdio;
import std.experimental.ndslice;
import std.experimental.ndslice.iteration: transposed;
struct sample{
        ulong [10] core_ctr;
        ulong [32] epu_ctr;
}


void main() {
        auto a1 = new sample[60];
        auto t3 = a1.sliced!(ReplaceArrayWithPointer.no)(3,4,5);
        writeln(t3[0][0][0].epu_ctr);
}

I don't know how VisualD works, but to provide auto-completion it should be able to compile a source code for autocompletion information, because simple analyzer would not work with variadic templates like opIndex(Indexes...)(Indexes indexes).

Nitpick: t3[0][0][0] is much slower than t3[0, 0, 0].

Best,
Ilya


Reply via email to