-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Hi, I'm working with about 13,000 points in 34 dimensions. I'm loading the data from a file and then creating a KDTree via KDTree(values: a) where a is my array of 34-element vectors (instances of a class which I created).
Is there any reason to think that shouldn't work? I am getting the following after reading the data and then trying to construct the KDTree:
Execution interrupted. Enter code to recover and continue.
Enter LLDB commands to investigate (type :help for assistance.)
Process 26088 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7ffeef3ffff8)
frame #0: 0x00007fff5562dcf8 libcorecrypto.dylib`ccaes_vng_ctr_crypt + 4
libcorecrypto.dylib`ccaes_vng_ctr_crypt:
-> 0x7fff5562dcf8 <+4>: pushq %r15
0x7fff5562dcfa <+6>: pushq %r14
0x7fff5562dcfc <+8>: pushq %r13
0x7fff5562dcfe <+10>: pushq %r12
Target 0: (repl_swift) stopped.
It's not clear to me what's going on -- I assume that it's an out of memory error? or something else? (How would I figure out what kind of error it is?)
What is the most expensive part of constructing a KDTree -- where is the bottleneck? Does KDTree create any auxiliary indices or other data structures which might be large?
Thanks in advance for any insights you can offer.
Robert Dodier
PS. I am working in the Swift repl with Swift 5.0 (current snapshot build). I disabled printing out the values of items declared via :set set print-decls false (so it isn't the case that the KDTree gets constructed and then the repl fails while trying to print a representation of it).