GNU Radio simulation stuck - c++

I have attached a screenshot of my design here:
when I start simulating it stuck and only plot a few vectors of data.
I think it's becasue of variable time shift block, it's a hierarchy block, when I connect a constant source to i'ts float input the design works perfectly but when I connect output of short to float it does not work,
I think it's becasue Argmax block produces one output for every vector but the variable time shift needs that output constantly.
how can i fix this?

I've written an answer to this question that you also posted on the discuss-gnuradio mailing list (archive):
Hi Mohammad,
to try, you could just use the repeat block.
Best regards, Marcus
I hope that solved your issue, since I haven't heard back from you :)

Related

UE4 - Detect Compute Shader Completion

I'm currently trying to make a plugin for Unreal that involves a compute shader. Currently, my shader runs, and I can access the memory block that it writes to, but I can't get to it at the right time. Either my array isn't fully formed, or I've come too late and all my data is (seemingly) gone. I don't expect there to be a BlockUntilShaderIsDonePlease function, but anything to go on to grab my data when everything's been filled out would be greatly appreciated.
Currently, I'm trying to loop until I extract the length value I expect from my shader code
//This is at the bottom of my usf function
InterlockedExchange(OutputArray[0], OutputArray.IncrementCounter(), Count);
Not only does this not work, but it seems like a bad way to go about it.
I've spent the last month scratching away at this, any help from someone who knows what they're talking about would be huge for me. Thanks

How to link multiple ports from a Expression to multiple groups of a Union

I add an image in order to explain myself better.
I have 300 something ports in a expression. I have created the equivalent number of groups in a union. I want each port of this expression to go to a port/field of the Union. One to one relationship. It seems like powercenter is not able to do this with autolink, or at least I'm unable to find the proper way to do this. How could I work arround this issue? Because I've been told that is likely that in a few days it will be more than 700 ports, and the amount it takes to do by hand is quite insane. Thanks in advance.
I'm surprised it validates... union is for homogenous sources but you seem to be trying to pivot your data (in which case I'd suggest using another transformation i.e. a normalizer and Informatica will start behaving as expected)
Possible solution: make a bunch of connections, save and export the file as xml, go to the lines when the connections are done, and replace that zone with as many rows as you need.
What I did specifically was to get the original rows, change the names as appropiate with the help of notepad++ and excel, and then go back to the original file and replace all of it. Check everything three times, and import the file back to powercenter.
I say possible solution because it's messy and dirty, but even though it may lead to mistakes I feel like the amount is vastly inferior and you have the versioning on your side, so just save before exporting. If someone with more experience could tell me it's thoughts about this, it would be a great opportunity to learn, just leaving this in case it goes unanswered

Method setTextColor:range: on NSTextView is ridiculously slow

I'm creating a simple editor in Mac OS X and I've come to the point where my editor needs to do some highlighting of code, for example, comments.
I am using Regex to find all comments, which I initially thought, was slow. Turns out, it does rather amazing job. For example, for 387 comments, regex needs "only" 0.008404 s to find them and returns array of NSRanges.
But here comes disaster. When I try to set different color to my text with method setTextColor:range: it completes very slow. It needs additional 9.872964 s (for those 387 comments I mentioned before) and it gets worse really fast when number of comments is increased.
So... Is there any way to do this faster? With NSAttributedStrings, perhaps?
I'm really sorry guys, but stackoverflow gave me suggestion on similar question (which I didn't found when I was searching).
It turns out you simply have to tell NSTextViews TextStorage that you will begin doing some editing. And when you finish, you commit those changes. Code looks like:
[textView.textStorage beginEditing];
// do some stuff here
[textview.textStorage endEditing];
Now I ran code with 456 comments, Regex needed 0.013887 s and coloring 0.215761 s, which is amazing drop!
Anyway, I hope someone will find that useful.

Plotting progress in cplex optimization

I would like to able to plot the progress of a MIP solved by cplex. Specifically I would like to plot lower and upper bounds as functions of cpu-time. But copying an pasting from the node log does not seem to be a smartest way of proceeding. Is it possible to access these information and to print them out/to file during the optimization?
I am using the concert technology C++ interface.
You can add a "MIP info callback" using the API routine CPXsetinfocallbackfunc or its analogue in Concert.
(Copying-and-pasting the log it dumps to the terminal is perfectly fine for getting a rough idea of what's going on, but be aware that the results can be highly variable.)
Callbacks are what you are looking for. You can find a nice introduction here:
http://eaton.math.rpi.edu/cplex90html/usrcplex/callbacks.html

Help with algorithm to dynamically update text display

First, some backstory:
I'm making what may amount to be a "roguelike" game so i can exersize some interesting ideas i've got floating around in my head. The gameplay isn't going to be a dungeon crawl, but in any case, the display is going to be done in a similar fasion, with simple ascii characters.
Being that this is a self exercise, I endeavor to code most of it myself.
Eventually I'd like to have the game runnable on arbitrarily large game worlds. (to the point where i envision havening the game networked and span over many monitors in a computer lab).
Right now, I've got some code that can read and write to arbitrary sections of a text console, and a simple partitioning system set up so that i can path-find efficiently.
And now the question:
I've ran some benchmarks, and the biggest bottleneck is the re-drawing of text consoles.
Having a game world that large will require an intelligent update of the display. I don't want to have to re-push my entire game buffer every frame... I need some pointers on how to set it up so that it only draws sections of the game have have been updated. (and not just individual characters as I've got now)
I've been manipulating the windows console via windows.h, but I would also be interested in getting it to run on linux machines over a puTTY client connected to the server.
I've tried adapting some video-processing routines, as there is nearly a 1:1 ratio between pixel and character, but I had no luck.
Really I want a simple explanation of some of the principles behind it. But some example (psudo)code would be nice too.
Use Curses, or if you need to be doing it yourself, read about the VTnnn control codes. Both of these should work on windows and on *nix terms and consoles (and Windows). You can also consult the nethack source code for hints. This will let you change characters on the screen wherever changes have happened.
I am not going to claim to understand this, but I believe this is close to the issue behind James Gosling's legendary Gosling Emacs redrawing code. See his paper, titled appropriately, "A Redisplay Algorithm", and also the general string-to-string correction problem.
Having a game world that large will
require an intelligent update of the
display. I don't want to have to
re-push my entire game buffer every
frame... I need some pointers on how
to set it up so that it only draws
sections of the game have have been
updated. (and not just individual
characters as I've got now)
The size of the game world isn't really relevant, as all you need to do is work out the visible area for each client and send that data. If you have a typical 80x25 console display then you're going to be sending just 2 or 3 kilobytes of data each time, even if you add in colour codes and the like. This is typical of most online games of this nature: update what the person can see, not everything in the world.
If you want to experiment with trying to find a way to cut down what you send, then feel free to do that for learning purposes, but we're about 10 years past the point where it is inefficient to update a console display in something approaching real time and it would be a shame to waste time fixing a problem that doesn't need fixing. Note that the PDF linked above gives an O(ND) solution whereas simply sending the entire console is half of O(N), where N is defined as the sum of the lengths of A and B and D.