Designing a circuit that calculates Hamming distance? [closed] - boolean-logic

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 2 years ago.
Improve this question
I came across this question and I couldn't find it in textbooks or the internet. Seems pretty unique.
I guess there would be some comparators and adders involved, but I have no clue where to start.

The first step will undoubtedly be XORing the two bit sets. Then you need to count the number of logical ones in the output. The best method for designing your circuit would be to make a complete analogy of the hack discussed in this question and explained perfectly in its answer by nneonneo. This would result in the optimal tree of adders, rather than relying on sequential counting. The idea is that in each layer you know how to cap the maximum possible sum of a subset of the inputs, and in how many bits it will fit, eliminating the need for a carry bit. The programming approach is designed for 32 bits but easily modifiable for less or more than that.
For more possible algorithms for computing Hamming weight see this link.

Related

Differentiating b/w memory bound and compute bound CUDA kernels [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I am trying to write a static analyzer for differentiating between data intensive and computation intensive CUDA kernels. As much as I have researched on this topic, there is not much literature present on it. One of the ways to accomplish this is to calculate the CGMA ratio of the kernel. If it is 'too high', then it might be compute intensive, otherwise, memory intensive.
The problem with the above method is that I can't seem to decide upon a threshold value for the ratio. That is, above what value should it be classified as compute intensive. One way is to use the ratio of CUDA cores and load/store units as threshold. What does SO think?
I came across this paper in which they are calculating a parameter called 'memory intensity'. First, they calculate a parameter called the activity factor, which is then used to calculate memory intensity. Please find the paper here. You can find memory intensity on page no: 6.
Does there exist any better approach? I am kind-of stuck in my research due to this, and desperately need help.

What is "overkill"? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Programmers often wonder if the use of a certain library or programming style is overkill. They also often claim that this is the case (and they are often believed).
What does "overkill" mean in the context of programming?
"overkill" is typically used to mean deploying overly flexible and/or over-engineered solutions to solve what is ostensibly a simple and highly localized problem. The canonical example is FizzBuzz Enterprise Edition.
The term "Overkill" literarilly (if there was ever a literal use of it) refers to the action of killing something or someone, with more resources than necessary. Something like shooting a deer 50 times to make sure it dies.
In programming it applies for the same principle: making use of more resources than necessary or to find an overly complex solution to a simple problem.
Some simple examples are
for i=1 to 100
x[i]=2^z[i];
y=x;
end
Where copying the entire array x in every iteration step achieves the desired result but you could also copy it elementwise y[i]=x[i] saving you some 900 operations and is thus an overkill.
Using the OpenCV library to threshold an image is definetley possible but uses many more resources than strictly necessary and is an exagerated example of an overkill.

Need a synonym for "don't care", as in Decision Tables or K-Maps (not for apathy) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I have more than one (non-technical) client who has been put off by the term "don't care" in a Decision Table context, even after I explain this is a technical term, and what it means. It just strikes them as a bit rude. When I search for synonyms I get results that have more to do with "apathy" than with this use of the term. (That is why I am not asking on English Language & Usage. This is also the source of the clients' reaction, I believe; it sounds too much like apathy, which is not what they expect from me as a consultant.)
Rather than fighting a silly battle I want to focus on the project. So I'd like to come up with a term that is clear to both technical & non-technical people, and is also inoffensive. Any suggestions?
So your users are going to see values and may want to select one that conveys that they don't care which value is ultimately selected?
I would suggest "No Preference".
EDIT: I might also suggest that you translate your request into layman's terms and try out the English stack exchange as suggested in the comments. Those folks might be better equipped to provide you with a plethora of answers assuming they understand your question.
Would any of these work for you?
Extraneous
Unconnected
Unrelated
Not relevant
Immaterial
Inconsequential
I have always used NA for not applicable. It seems to already be in the non-technical vocabulary.
Neutral -
Indifferent -
No Opinion -
Unaffected -
Unconcerned -
Does Not Matter

Making my own Carbon Footprint Calculator [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
I'm trying create my own carbon footprint calculator, but I'm having trouble finding all the proper equations and such online, anyone know of any decent resources?
Wow, that is a huge question. In part because "all the proper equations" really depend on who is doing the asking. I would start here: http://www.withouthotair.com/
This resource is HUGE for this. =)
I think this project sounds very interesting!
If you are familiar with web development, it would be very cool to make this a web-based project, which allows for constant growth and development of the equations. You could even make it so that users of your web site can view the equations you are using, and input their own equations. Maybe you could even consider some sort of mechanism to fold back user equations into the base - or set up multiple different bases for different users of different lifestyles.
I didn't directly answer your question, but I hope these concepts are interesting and useful to you.
-Brian J. Stinar-

Software Development Methodology [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'd like to know the difference between Software Development Process and Software Development Methodology if there is any.
A process is only a component of a methodology. A methodology has:
A process aspect: what tasks are to be carried out?
A product aspect: what things are to be used and/or created?
A people aspect: what people and teams are going to do all this?
A time aspect: how does all this get organised in time?
A modelling aspect: what modelling units (language) are used to capture all this?
This is a simplified interpretation of the more formal definitions that you can find in ISO/IEC 24744 Software Engineering - Metamodel for Development Methodologies.
Still, the terms "method", "methodology" and "process" are used by different people with different meanings. After 20 years working in this field, I think that trying to agree on a standard use is futile. :-)
It's the same as the difference between process and methodology in any other discipline. I think of the processes as the implementation of the methodology.
The methodology is more a general mindset which sets basic parameters. A process is a concrete manifestation within the given borders of the methodology. You can think of agile as methodology and Scrum as concrete implementation.
Sometimes it's hard to distinguish between the two. As rule of thumb: If you can immediately start to work with it, it's probably a process. A methodology requires more adaptation .
A more wide term would be Software Development Philosophies.
http://en.wikipedia.org/wiki/List_of_software_development_philosophies