47,822 reputation
398199
bio website halirutan.de
location Leipzig, Germany
age
visits member for 2 years, 10 months
seen 12 hours ago

Although I'm quite familiar with Mathematica, I always try to keep an open mind and don't use it as golden hammer. I'm particularly good at things that are fun, for instance


Aug
10
awarded  Nice Answer
Aug
8
answered Combining images with CUDA
Aug
7
comment Combining images with CUDA
@AlexeyBobrick About your clarification point (2): By doesn't look as good, do you mean the result? If you speak of Image Add like your caption suggests, then I am thinking about a real image processing image add where there is no such thing as antialiasing. You do direct pixel-by-pixel operations without adjusting something else. Can you give a specific example about what you mean? Btw, do you know the difference between an image add and setting an image region which is what Inset does?
Aug
7
comment Combining images with CUDA
.. CUDA device. For this, you have to allocate 1000^2 and 10^2 pixel in the device memory. Then you have to write access each of these pixel while you copy the image. This alone makes 1000100 of the write accesses (you have to read those locations from main memory too). Then you set those 10^2 region in your CUDA device and after this, you copy (again read access in the CUDA and allocation and write access in main memory) those 1000^2 back to main memory. Surely, using memcpy will be faster by magnitudes, but nevertheless work is tremendous compared to simply setting 100 memory locations.
Aug
7
comment Combining images with CUDA
@AlexeyBobrick I don't speak about Inset, I speak about setting array elements explicitly in a vectorized way like Simon suggested. Let me make my point clear, for this specific problem where we want to set a 10x10 region in a 1000x1000 image, we have the following to do when using high-level Mathematica: The 1000^2 image is already in main-memory, because, well, we already have it in Mathematica, and Mathematica can access his own memory. Therefore, setting a 10^2 region is similar to 100 write accesses. Compare this to the CUDA approach: First, you have to transfer both images to your..
Aug
6
comment Combining images with CUDA
I would be surprised when a CUDA function for this problem is faster than a normal Mathematica function. Copying both images to CUDA memory and copying the result back, only for setting pixel values? This sounds like a bad plan and too much overhead, especially since setting an array like Simon showed should be a vectorized operation anyway.
Aug
5
comment Counting and extracting hit circles/triangles for randomly chosen points
@DavidCaliri Is there something missing in my answer. If this is not the case, would you consider accepting it as answer? Btw, you haven't accepted an answer on your TeX question either.
Aug
4
comment Using ListPlot and Joined, how to keep markers in colour but make all joining lines gray?
@Öskå Then use (ColorData[1] /@ {1, 2, 3}) as option-value of MeshStyle.
Aug
4
answered Using ListPlot and Joined, how to keep markers in colour but make all joining lines gray?
Aug
1
comment How to group each element with each consecutive elements in one head
@alancalvitti Nope, I never used Fortran. Seems to be some other influence.
Aug
1
comment How to group each element with each consecutive elements in one head
@eldo Hehe, haliturutan sounds a bit like Truthahn in German :-) I edited the answer.
Aug
1
revised How to group each element with each consecutive elements in one head
added 201 characters in body
Aug
1
awarded  Nice Answer
Jul
31
comment Faster Alternative to DeleteDuplicates for deleting elements in list
Have you searched the forum? There are some threads about his, for instance here mathematica.stackexchange.com/a/35214/187
Jul
31
answered How to group each element with each consecutive elements in one head
Jul
30
comment Why is my compiled code slower?
The example code is missing braces and is syntactically not correct. In its current form the question cannot be answered.
Jul
29
comment Simple Choice-Dialog like the auto-completion popup
@ArielSepulveda With popup at cursor I mean the behavior the autocompletion popup shows: It appears exactly beneath your current cursor position where you type.
Jul
29
comment Simple Choice-Dialog like the auto-completion popup
@ArielSepulveda I do have a hand-crafted list-dialog-clickedy-clack too for my symbol information palette but this lacks of the short-cuts and arrow keys. You always have to click. Additionally, and I haven't mentioned this here, I would like the dialog to popup at cursor (not mouse!) position. This seems impossible to achieve as far as I can tell. As always, if you want to do a real application with the dynamic UI elements it is never a one-line like advertised in the million toy-demonstrations.
Jul
29
comment How to convert a notebook cell to a string retaining all formatting, colorization of identifiers etc?
(here and here) a rather pessimistic view about the possibility to access front end used for highlighting.
Jul
29
comment How to convert a notebook cell to a string retaining all formatting, colorization of identifiers etc?
@VladimirReshetnikov Although you can include all kinds of formatting in a Mathematica string, the things you want to extract are done on-the-fly by the front-end for viewing purposes only. While it makes some sense to provide e.g. access to a hidden front end Mathematica lexer, I would really be surprised, if there is any way to use the front ends internal algorithms used for highlighting. Anyway, maybe the only person that could give you an answer here mentions at several places...