« first day (1025 days earlier)      last day (3456 days later) » 

12:00 AM
Nah, so to be more specific, I have a GridGraph[] where only some fraction of all the vertices are connected, but I want to take that graph and make it so the top row of vertices are all connected
(in addition to the already connected ones)
 
12:14 AM
Is there some clever way to put If statements in Table[]'s?
 
 
2 hours later…
1:54 AM
@FdotFloss For GridGraph[{m,n}] you can generate the list of edges at the top of the default layout with Table[a m <-> (a + 1) m, {a, n - 1}].
 
2:39 AM
@MichaelHale, thanks, that's essentially what I ended up doing, I was just hoping there was some secret short mathematica way
because then I also had to do EdgeAdd[] and Union[] to add them and get rid of duplicates
 
 
3 hours later…
6:00 AM
@acl i've used it on Windows
 
 
5 hours later…
10:59 AM
anyone here could check something quick for me? I must not be seeing something or this is very strange bug.
 
11:11 AM
I am ok, I found what I was doing wrong. case closed.
 
acl
11:22 AM
@Rojo OK, so, it doesn't break the moment you do anything slightly more than the examples? You do not see any reason I don't spend a couple of days modifying my code for it?
 
 
1 hour later…
12:42 PM
@acl, I've used it on Windows too. With a GTX550Ti card at home and a Quadro 4000 at work. It was a bit of a PITA to get it working at first, but well worth it as I got more than an order of magnitude speed up on some code that uses FFTs heavily. I do however get the occassional driver crash on the work system which I have not been able to debug.

In my experience once you have the examples working and have successfully compiled and run a simple CUDAFunction, you should be okay to go for it.
 
1:08 PM
Here is a small quiz:

ClearAll[z, foo, k];
z = Sinh[Pi - k*Pi]/Pi;
foo1[k_] := (Evaluate[z])
foo2[k_] := (Evaluate[z]+0)
Do you expect (without trying!) that

foo1[1]
foo2[1]

will give different result or the same?
 
1:25 PM
I really liked this way to create new columns in a list. mathematica.stackexchange.com/questions/65200
Can someone see some problem on that?
 
@Nasser I wonder if it would be worthwhile for the syntax highlighter to show heads like Evaluate, Unevaluated and Sequence in a different colour to emphasize their special nature?
 
@WReach , this was really strange. Just adding anything, causing z not to evaluate! I was going to ask this on main board for a clear explanation from language experts.
 
1:39 PM
@acl It worked ok, it didn't break. It just had limitations. There were some things that can do in cuda that weren't implemented in mma and it was annoying to me
And, it had an important leak, but it was reported as fixed for this version (but haven't tried)
 
@Nasser Evaluate only has its special meaning when it is the head of an argument to a function that holds its arguments. In the case of foo2, it is buried within a Plus expression and unlike foo1 does not get evaluated at definition time.
The "function that holds its arguments" is SetDelayed in this case.
 
@WReach Then what would be the correct way to do this:
ClearAll[z, foo, k];
z = Sinh[Pi - k*Pi]/Pi;
foo[k_] := z
foo[1]
? Only other way is this:
z = Sinh[Pi - k1*Pi]/Pi;
foo[k_] := z /. k1 -> k
foo[1]
I normally do not do the above, but pass everything via arguments, but this is just scratch notebook and was trying something.
 
We can write foo[k_] = z, using Set instead of SetDelayed. This yields essentially the same effect as foo[k_] := Evaluate[z]. In a scratch notebook, this is a good strategy as we can spot any symbol conflicts right away. In library code, one needs to be careful with such constructs as the symbols might conflict with user code. In such circumstances, care must be taken to localize symbols and avoid unexpected symbol renaming.
 
@WReach yes, this is a good workaround. I normally never use = for function definition, I am just used to use := all the time. Thanks.
 
 
7 hours later…
acl
8:29 PM
@SimonWoods OK, thanks for the information
@Rojo OK thanks
 

« first day (1025 days earlier)      last day (3456 days later) »