Daily Archives

Articles indexed Tuesday March 16 2010

Page 6/130 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • CUDA, more threads for same work = Longer run time despite better occupancy, Why?

    - by zenna
    I encountered a strange problem where increasing my occupancy by increasing the number of threads reduced performance. I created the following program to illustrate the problem: #include <stdio.h> #include <stdlib.h> #include <cuda_runtime.h> __global__ void less_threads(float * d_out) { int num_inliers; for (int j=0;j<800;++j) { //Do 12 computations num_inliers += threadIdx.x*1; num_inliers += threadIdx.x*2; num_inliers += threadIdx.x*3; num_inliers += threadIdx.x*4; num_inliers += threadIdx.x*5; num_inliers += threadIdx.x*6; num_inliers += threadIdx.x*7; num_inliers += threadIdx.x*8; num_inliers += threadIdx.x*9; num_inliers += threadIdx.x*10; num_inliers += threadIdx.x*11; num_inliers += threadIdx.x*12; } if (threadIdx.x == -1) d_out[blockIdx.x*blockDim.x+threadIdx.x] = num_inliers; } __global__ void more_threads(float *d_out) { int num_inliers; for (int j=0;j<800;++j) { // Do 4 computations num_inliers += threadIdx.x*1; num_inliers += threadIdx.x*2; num_inliers += threadIdx.x*3; num_inliers += threadIdx.x*4; } if (threadIdx.x == -1) d_out[blockIdx.x*blockDim.x+threadIdx.x] = num_inliers; } int main(int argc, char* argv[]) { float *d_out = NULL; cudaMalloc((void**)&d_out,sizeof(float)*25000); more_threads<<<780,128>>>(d_out); less_threads<<<780,32>>>(d_out); return 0; } Note both kernels should do the same amount of work in total, the (if threadIdx.x == -1 is a trick to stop the compiler optimising everything out and leaving an empty kernel). The work should be the same as more_threads is using 4 times as many threads but with each thread doing 4 times less work. Significant results form the profiler results are as followsL: more_threads: GPU runtime = 1474 us,reg per thread = 6,occupancy=1,branch=83746,divergent_branch = 26,instructions = 584065,gst request=1084552 less_threads: GPU runtime = 921 us,reg per thread = 14,occupancy=0.25,branch=20956,divergent_branch = 26,instructions = 312663,gst request=677381 As I said previously, the run time of the kernel using more threads is longer, this could be due to the increased number of instructions. Why are there more instructions? Why is there any branching, let alone divergent branching, considering there is no conditional code? Why are there any gst requests when there is no global memory access? What is going on here! Thanks

    Read the article

  • Code Golf: Quickly Build List of Keywords from Text, Including # of Instances

    - by Jonathan Sampson
    I've already worked out this solution for myself with PHP, but I'm curious how it could be done differently - better even. The two languages I'm primarily interested in are PHP and Javascript, but I'd be interested in seeing how quickly this could be done in any other major language today as well (mostly C#, Java, etc). Return only words with an occurrence greater than X Return only words with a length greater than Y Ignore common terms like "and, is, the, etc" Feel free to strip punctuation prior to processing (ie. "John's" becomes "John") Return results in a collection/array Extra Credit Keep Quoted Statements together, (ie. "They were 'too good to be true' apparently")Where 'too good to be true' would be the actual statement Extra-Extra Credit Can your script determine words that should be kept together based upon their frequency of being found together? This being done without knowing the words beforehand. Example: "The fruit fly is a great thing when it comes to medical research. Much study has been done on the fruit fly in the past, and has lead to many breakthroughs. In the future, the fruit fly will continue to be studied, but our methods may change." Clearly the word here is "fruit fly," which is easy for us to find. Can your search'n'scrape script determine this too? Source text: http://sampsonresume.com/labs/c.txt Answer Format It would be great to see the results of your code, output, in addition to how long the operation lasted.

    Read the article

  • Java encryption : with method can get me a shorter message ?

    - by Frank
    I don't know too much about encryption, I just want to ask, which method can get me the shortest result message ? For instance, the message looks like this : "This is the secret input message", I wonder if the encrypted message can be shorter then the above 32 characters long ? Maybe something like "dfkfjkvf12". Frank

    Read the article

  • Math for core animation?

    - by jasonbogd
    What is a good level of math required for, like, advanced core animation? Take this for example: http://cocoadex.com/2008/01/lemur-math.html And what's a good book/resource to learn it? -Jason

    Read the article

  • Applying a pixel shader effect to a portion of an image

    - by Nick
    I have a ScrollViewer that contains a very large video (16 megapixel @ 10fps) and I want to apply a pixel shader effect to it. Given the size of the images I can't apply the effect directly to the image. So I apply the effect to the ScrollContentPresenter in the control style. Which is great, everything runs nice and fast. However, I'm also rendering annotations inside of the ScrollContentPresenter which I do NOT want effects applied to (but they need to move and scale along with the image). Is there to apply the effect just to the clipped and displayed portion of the image or do I need to build a rather more complex control?

    Read the article

  • Will Intel be releasing anymore 6-core processors soon?

    - by jasondavis
    I am about to start buying parts every week for as long as it takes me to build the best PC I can build. I am looking at the Intel i7-920 processor right now because it is about 250$ and it is a quad-core processor based on the x58 chipset I believe. From what I have read so far, intel is coming out with some 6-core processors soon that will also use the x58 chipset and will allow me to use the same motherboard and memory/ram to upgrade to a 6-core. This sounds really good to me right now. I just read that the new 6-core processor. The Core i7-980X (extreme edition) was just released which is the first 6-core processor but it is supposed to be around $1,000 so I will probably just get the i7-920 for now and then upgrade to the 6-core version when the price goes down. The motherboard I am looking at getting the GIGABYTE GA-X58A-UD5 which is around $280 at newegg.com So that is my basic plan SO far. I have not purchased any parts yet. I am just wanting to ask if this sounds like a good idea or if I should wait longer if I am wanting to eventually have a 6-core processor. Does anyone know if Intel is planning on releasing any other 6-core processor in addition to the Core i7-980X in the near future? I just want to make sure I am buying the best setup for my money if I am going all out on it, thanks for any tips/advice.

    Read the article

  • SQL SERVER – Quick Note of Database Mirroring

    - by pinaldave
    Just a day ago, I was invited at Round Table meeting at prestigious organization. They were planning to implement High Availability solution using Database Mirroring. During the meeting, I have made few notes of what was being discussed there. I just thought it would be interested for all of you know about it. Database Mirroring works [...]

    Read the article

  • Video: Telerik Silverlight Chart showing live data from SharePoint 2010

    - by Sahil Malik
    Ad:: SharePoint 2007 Training in .NET 3.5 technologies (more information). In this video, I demonstrate  - The process of writing, authoring, deploying, configuring, and debugging a Custom WCF service in SharePoint 2010 Integrating it with the Telerik Silverlight RAD Chart, that shows live data from the server showing CPU Usage of your web front end – can be enhanced to show whatever else you want. Doing all this in Visual Studio 2010, how you’d put your project together, how do you go about diagnosing it, debugging it – the whole bit. The whole presentation is about 45 mins, and it’s mostly all code, so plenty of juicy stuff here! At the end of this, you have a pretty sexy app running .. just fast forward to the end of the video below, and you’ll see what I’m talking about. :) You can watch the video here Comment on the article ....

    Read the article

  • Telerik Silverlight Grid with BCS Lists in SharePoint 2010

    - by Sahil Malik
    Ad:: SharePoint 2007 Training in .NET 3.5 technologies (more information). Okay my next video is online. In this video, I demonstrate the usage of the Telerik Silverlight grid working with a Business Connectivity Services (BCS) list over the Client Object Model. I use the Telerik grid to create a view on a BCS list, and demonstrate the rich value that a nice Silverlight grid can bring into SharePoint 2010. The entire presentation is mostly all code. It’s about 1/2 hr in length. Watch the video Comment on the article ....

    Read the article

  • The Apple iPad &ndash; I&rsquo;m gonna get it!

    - by Sahil Malik
    Ad:: SharePoint 2007 Training in .NET 3.5 technologies (more information). Well, heck, here comes another non-techie blogpost. You know I’m a geek, so I love gadgets! I found it RATHER interesting to see all the negative news on the blogosphere about the iPad. The main bitch points are - No Multi tasking No Flash Just a bigger iPhone. So here’s the deal! My view is, the above 3 are EXACTLY what I had personally hoped for in the Apple iPad. Before the release, I had gone on the record saying - “If the Apple Tablet is able to run full fledged iTunes (so I can get rid of iTunes on my desktop, I don’t like iTunes on Windows), can browse the net, can read PDFs, and will be under $1000, I’ll buy it”. Well, so, the released iPad wasn’t exactly like my dream tablet. The biggest downer IMO was it’s inability to run full iTunes. But, really, in retrospect, I like the newly released iPad. And here is why. No Multi tasking and No Flash, means much better battery life. Frankly, I rarely multi task on my laptop/desktop .. yeah I know my OS does .. but ME – I don’t multi task, and I don’t think you do either!! As I type this blogpost, I have a few windows running behind the scenes, but they are simply waiting for me to get back to them. The only thing truly running and I am making use of, other than this blogost, is media player playing some music – which the iPad can do. Also, I am logged into IM/Email – which again, iPad can do via notifications. It does the limited multitasking I need, without chewing down on batteries. Smart thinking, precisely the reason I love the iPhone. I don’t want a bulky battery consuming machine. Lack of flash? Okay sure, I can’t see Hulu on my iPad. That’s some loss. I can see youtube. Also, per Adobe I can’t see some porn sites, which I don’t want to see on my iPad. But, Flash is heavy. Especially flash video. My dream is to see silverlight run on the iPhone and iPad. No flash = not such a big loss. Speaking of battery life – 10 hours is plenty. I haven’t been away from electricity for that long usually, so I’m okay with charging it up when it runs low. It’s really not such a big deal honestly. Finally, eBook functionality – wow! I went on the record saying, eBook readers are not for me, but seriously, the iPad is perfect for my eBook needs at least. And as far it being just a bigger iPhone? I’ve always wanted a bigger iPhone, precisely for the eBook reading experience. I love my iPhone, I love the apps on it. The only thing that sucks about the iPhone is battery life, but other than that, it is the best gadget I have ever bought! And something that runs on mobile chips, is that thin, and those newly written apps .. mail, calendar .. I am very very excited to get my iPad, which will be the 64gig 3G version. The biggest plus in an iPad ……… no contract on data. I am *hoping*, this means that I can buy a SIM card in Europe, and use the iPad here. That would be killer awesome! But hey, if I had to pick downers in the iPad, they would be - - I wish they had a 128G Version. Now that we have a good video viewing machine, I know I’d chew up space quickly.- Sync over WIFI, seriously Apple.  Both for iPhone and iPad.- 3 month wait!!- Existing iPhone users should get a discount on the iPad data plan. Comment on the article ....

    Read the article

  • DNRTV: Developing for SharePoint &ndash; Part 2

    - by Sahil Malik
    Ad:: SharePoint 2007 Training in .NET 3.5 technologies (more information). Carl and I got together a couple of weeks ago and chatted about the various interesting facilities in SharePoint 2010 – especially around some real practical challenges that we faced with SharePoint 2007. We talked about a number of indepth practical stuff, such as scalability and performance in SP2010. The latest episode is now online for your viewing pleasure. Comment on the article ....

    Read the article

  • Speaking on SharePoint Client Side APIs

    - by Sahil Malik
    Ad:: SharePoint 2007 Training in .NET 3.5 technologies (more information). I’ll be speaking about: Topic - SharePoint 2010: The Client side APIs In this session, Sahil will talk about the various Client Side APIs available in SharePoint 2010. Specifically the client object model, ADO.NET REST API, and custom WCF Services in SharePoint 2010. At - Where - 6021 Univeristy Blvd, Suite 250, Ellicott City, MD 21043When – 2/23 at 7PM, more details at www.cmap-online.org AND Where – 1900 Gallows Road, Vienna, VAWhen – 3/23 at 7PM, more details at http://caparea.net/ So whose coming? : ) Comment on the article ....

    Read the article

  • IPC using SendMessage but receiver have random window caption

    - by iira
    I found "Delphi Inter Process Communication (IPC) using SendMessage" with Google. Here's a piece of the code from Sender to send a message for Receiver : procedure TfrmClient.FormCreate(Sender: TObject); begin MyMsg := RegisterWindowMessage('MyMessage'); ServerApplicationHandle := FindWindow('TApplication', 'Project1'); end; The problem is my receiver have random caption name. So how can I send a message to receiver? Any idea? My Sender is a DLL and my receiver is Exe.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >