Search Results

Search found 107 results on 5 pages for 'nils munch'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Solving problems involving more complex data structures with CUDA

    - by Nils
    So I read a bit about CUDA and GPU programming. I noticed a few things such that access to global memory is slow (therefore shared memory should be used) and that the execution path of threads in a warp should not diverge. I also looked at the (dense) matrix multiplication example, described in the programmers manual and the nbody problem. And the trick with the implementation seems to be the same: Arrange the calculation in a grid (which it already is in case of the matrix mul); then subdivide the grid into smaller tiles; fetch the tiles into shared memory and let the threads calculate as long as possible, until it needs to reload data from the global memory into shared memory. In case of the nbody problem the calculation for each body-body interaction is exactly the same (page 682): bodyBodyInteraction(float4 bi, float4 bj, float3 ai) It takes two bodies and an acceleration vectors. The body vector has four components it's position and the weight. When reading the paper, the calculation is understood easily. But what is if we have a more complex object, with a dynamic data structure? For now just assume that we have an object (similar to the body object presented in the paper) which has a list of other objects attached and the number of objects attached is different in each thread. How could I implement that without having the execution paths of the threads to diverge? I'm also looking for literature which explains how different algorithms involving more complex data structures can be effectively implemented in CUDA.

    Read the article

  • Android getting XML values

    - by Nils
    Hello, I have the following XML code, which I got by a UPnP device and like to get the res value - the RTSP URL. In this case rtsp://10.42.0.103:554/live.sdp How can I do this? I heard that Android has some built-in support for reading XML. Is that true? <DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"> <item id="11" parentID="1" restricted="1"> <dc:title>Network Camera Stream 1</dc:title> <upnp:class>object.item.videoItem</upnp:class> <res protocolInfo="rtsp-rtp-udp:*:video/mpeg4-generic:*" resolution="640x480">rtsp://10.42.0.103:554/live.sdp</res> </item> <item id="12" parentID="1" restricted="1"> <dc:title>Network Camera Stream 2</dc:title> <upnp:class>object.item.videoItem</upnp:class> <res protocolInfo="rtsp-rtp-udp:*:video/mpeg4-generic:*" resolution="176x144">rtsp://10.42.0.103:554/live2.sdp</res> </item> </DIDL-Lite>

    Read the article

  • How to draw some lines in a view element defined in the xml layout

    - by Nils
    Hello, I have problems drawing some simple lines in a view object (Android programming). First I created the layout with the view element(kind of painting area) in it (XML file). [...] < View android:id="@+id/viewmap" android:layout_width="572px" android:layout_height="359px" android:layout_x="26px" android:layout_y="27px" [...] ... and tried then to access it to draw some lines. Unfortunately the program is running and other UI elements like buttons are displayed, but I can't see the drawings. What's wrong ? [...] viewmap = (View) findViewById(R.id.viewmap); Canvas canvas = new Canvas(); viewmap.draw(canvas); Paint p = new Paint(); p.setColor(Color.BLUE); p.setStyle(Paint.Style.STROKE); canvas.drawColor(Color.WHITE); p.setColor(Color.BLUE); canvas.drawLine(4, 4, 29, 5, p); p.setColor(Color.RED); viewmap.draw(canvas); [...] Thanks for help :) !

    Read the article

  • cmake: Target-specific preprocessor definitions for CUDA targets seems not to work

    - by Nils
    I'm using cmake 2.8.1 on Mac OSX 10.6 with CUDA 3.0. So I added a CUDA target which needs BLOCK_SIZE set to some number in order to compile. cuda_add_executable(SimpleTestsCUDA SimpleTests.cu BlockMatrix.cpp Matrix.cpp ) set_target_properties(SimpleTestsCUDA PROPERTIES COMPILE_FLAGS -DBLOCK_SIZE=3) When running make VERBOSE=1 I noticed that nvcc is invoked w/o -DBLOCK_SIZE=3, which results in an error, because BLOCK_SIZE is used in the code, but defined nowhere. Now I used the same definition for a CPU target (using add_executable(...)) and there it worked. So now the questions: How do I figure out what cmake does with the set_target_properties line if it points to a CUDA target? Googling around didn't help so far and a workaround would be cool..

    Read the article

  • Android Layout question

    - by Nils
    Hello, I need to create a map with items on it (the map consists of a drawable object, which represents a room) and I thought about using buttons with background images for the items so that they are clickable. I guess the AbsoluteLayout fits here the best, but unfortunately it's deprecated. What layout would you recommend me for this kind of application ? Is there another layout which supports X/Y coordinates ?

    Read the article

  • How does CDI injection work in MDBs and @Scheduled beans?

    - by Nils-Petter Nilsen
    I'm working on a large Java EE 6 application that is deployed on JBoss 6 Final. My current tasks involve using @Inject consistently instead of @EJB, but I'm running into some problems on some types of beans, specifically @MessageDriven beans and beans with @Scheduled methods. What happens is that if I'm unlucky with the timing (for @Schedule) or if there are messages in the MDBs' queues at startup, instantiation of the beans will fail because the injected resources (which are EJBs themselves) are not bound yet. Because I use @Inject, I'm guessing that the EJB container considers my beans to be ready, since the container itself does not care about @Inject; it probably simply assumes that since there are no @EJB injections, the beans are ready for use. The injected CDI proxies will then fail because the resources to inject aren't actually bound yet. Tiny example: @Stateless @LocalBean public class MySupportingBean { public void doSomething() { ... } } @Singleton public class MyScheduledBean { @Inject private MySupportingBean supportingBean; @Schedule(second = "*/1", hour = "*", minute = "*", persistent = false) public void onTimeout() { supportingBean.doSomething(); } } The above example will probably not fail often because there are only two beans, but the project I'm working on binds lots of EJBs, which will amplify the problem. But it might fail because there is no guarantee that MySupportingBean is bound first, and if onTimeout is invoked before MySupportingBean is bound, then instantiation of MyScheduledBean will fail. If I used @EJB instead, MyScheduledBean wouldn't be bound until the dependency to MySupportingBean was satisfied. Note that the example will not fail in onTimeout itself, but when CDI attempts to inject MySupportingBean. I've read a lot of posts on different forums where many people argue that @Inject is always better. Generally, I agree, but how do they handle @Schedule or @MessageDriven combined with @Inject? In my experience, it comes down to dumb luck whether the beans will work or not in those cases, and the beans will fail arbitrarily, depending on which order the EJBs are deployed in, and when @Schedule or onMessage are invoked.

    Read the article

  • inheritance in document database?

    - by nils petersohn
    i am wondering because i searched the pdf "xxx the definitive guide" and "beginning xxx" for the word "inheritance" but i didn't find anything? am i missing something? because i am doing a tablePerHierarchy inheritance with hibernate and mysql, does that become deprecated for some reason in xxx? (replace xxx with the "not only sql" database you like)

    Read the article

  • decent html5 offline storage and caching examples

    - by Nils
    I'm keen to test out html offline storage and caching with a view to developing a prototype to show off the offline web application capabilities of html5. I've found some webkit-specific samples, but I'm battling to find any decent code samples that even work at all in Firefox 3.6 For a sample, I'd be happy with something that works with the following: Our company uses jquery extensively so I'd prefer samples that use that library or pure javascript. It should at least work on firefox (3.6+ is fine) Can anyone point me to some links that provide some guidance and code samples?

    Read the article

  • Android and Kernel-Modules...

    - by Nils Pipenbrinck
    So - Android is build on top of a stripped down linux system. Most of the convenient utilities are missing but all the basics are there. I can call insmod and rmmod. No problem. But where do kernel-modules and firmware files reside? I can't find any. there is no /lib/modules in the standard distribution. Problem: I need modules. For sure don't want to compile support for each and every usb-device in the world into the linux-kernel. Where should I put them?

    Read the article

  • grails date from params in controller

    - by nils petersohn
    y is it so hard to extract the date from the view via the params in a grails controller? i don't want to extract the date by hand like this: instance.dateX = parseDate(params["dateX_value"])//parseDate is from my helper class i just want to use instance.properties = params you know :) in the model the type is java.util.Date and in the params is all the information (dateX_month, dateX_day, ...) i searched on the net and found nothing on this :( i hoped that grails 1.3.0 could help but still the same thing. i can't and will not belief that extracting the date by hand is nessesary!

    Read the article

  • Detached views in eclipse on linux

    - by Nils Otto
    Hi, When i detach wiews in eclipse on ubuntu, eg package explorer, it shows up as a separate window in ubuntu (Eclipse ends up taking up 4 windows, and that makes alt-tabbing through my open programs a pain) Is there a way to fix this so Eclipse only show up as one window in ubuntu no matter how many vews are detached?

    Read the article

  • Printdialog in multithreaded wpf window thrown TargetInvocationException

    - by Nils
    I have designed a multithreaded app, which is starting most windows in an dedicated thread like this: Thread newWindowThread = new Thread(new ThreadStart(ThreadStartingPoint)); newWindowThread.SetApartmentState(ApartmentState.STA); newWindowThread.IsBackground = true; newWindowThread.Start(); However, if in one of those window-in-own-thread I try to print something by simply calling PrintDialog pDialog = new PrintDialog(); bool? doPrint = pDialog.ShowDialog(); I get a TargetInvocationException - it does look like the PrintDialog does not reside in the same thread as my window. Is there any way to create a thread-agnostic (or "thread-save") PrinterDialog ?

    Read the article

  • zsh behaves weird in screen

    - by Nils Riedemann
    Hi there, I have zsh set up as my default shell. It works fine as long as i am not within a screen. When i start screen it looks as if some dotfiles are not loaded. For example my $PATH isn't set correctly and some directories are missing. I'm not quite sure where to start looking. Since all is fine, as long as i'm not in a screen. My dotfiles can be viewed on github. I also use oh-my-zsh — as you will notice.

    Read the article

  • How do i select the 1st and then every 4th row in a html-table with nth-child()-selector?

    - by Nils
    Ok, math isn't my strong side, I admit it. All I want to do is to select the first, 5th, 9th, 13th, 17th etc row in a html-table. Can anybody with better math-skills point me in the right directionor perhaps supply a "nth-child-for-dummies" guide? I tried nth-child(1n+4) (which selects the 4th row and everyone after), and i also tried nth-child(0n+4) which selects the fourth row and nothing after that. Thanks in advance.

    Read the article

  • Easy framework for OpenGL Shaders in C/C++

    - by Nils
    I just wanted to try out some shaders on a flat image. Turns out that writing a C program, which just takes a picture as a texture and applies, let's say a gaussian blur, as a fragment shader on it is not that easy: You have to initialize OpenGL which are like 100 lines of code, then understanding the GLBuffers, etc.. Also to communicate with the windowing system one has to use GLUT which is another framework.. Turns out that Nvidia's Fx composer is nice to play with shaders.. But I still would like to have a simple C or C++ program which just applies a given fragment shader to an image and displays the result. Does anybody have an example or is there a framework?

    Read the article

  • How do I set a property to the output of a command in msbuild/xbuild

    - by Nils
    In msbuild/xbuild I'd like to have a "libPath" property which can be ovveridden on the commandline using /p:libpath="/path/to/all/libs". But when this property is undefined I want to call pkg-config --retrieve-Path somePackage to get the current systems path. I thought like here I need the output of a command to be stored in a Property. The command always returns one line of output. I have tryied something like <PropertyGroup> <LibPath /> </PropertyGroup> <Task ....> <Exec Command="pkg-config --retrieve-Path somePackage" Condition="$(LibPath)' == ''"> <OutputTaskParameter="output" PropertyName="LibPath" /> </Exec> </Task> But that didn't work.

    Read the article

  • Autocompletion based on filenames in a directory

    - by Nils Riedemann
    Hi there, I want to have a function in my zsh for faster accessing my todo-files. It should look inside the folder ~/tasks where i put my todo-lists and stuff. Now i want to type task p and when I hit tab, it should use the files in that directory for autocompletition. Can anyone point me some direction? Or share some snippet to work with? Thanks

    Read the article

  • How to prevent maven to resolve dependencies in local repository

    - by Nils Schmidt
    Is there a way to tell maven (when doing mvn package, mvn site or ...) not to resolve the dependencies from the local repository? Background of this question: Sometimes I get into problems, when previously cached dependencies (e.g. SomeProject-0.7-ALPHA) are no longer available in the remote repository. In my local build everything still works fine as the dependency has been cached before. As soon as I share my pom with others, they may get into trouble, as they dont have a cached version of that dependency and the dependency can no longer be resolved from the remote repository. Any help will be appreciated. Thanks in advance!

    Read the article

  • EntityFramework: Access dabase-column using user defined Type

    - by Nils
    I "inherited" an old Database where dates are stored as Int32 values (times too, but dates shall suffice for this example) i.e. 20090101 for Jan. 1st 2009. I can not change the schema of this database because it is still accessed by the old programs. However I want to write a new program using EF as the O/R-M. Now I'd love to have DateTime-Values in my Model. Is there a way to write a custom type and use this as a Type in the EF-Model. Something like a Type "OldDate" with properties: DatabaseValue : Int23 Value : DateTime (specifying the date-part whereas the time-part is always 0:00:00) Is something like this possible with the EF-Model ?

    Read the article

  • Store password temporarily in memory

    - by Nils
    Hello, I'm looking for a way in an Android application to store a password within the memory as long as the application is running (cf. different activities). I was first thinking about the SharedPreferences, but then it's saved in the flash memory, which isn't that good for a password, I guess. I'm unsure, what's the best way. What would you recommend me?

    Read the article

  • How to get some randomized concats based on 2 columns from 1 table?

    - by Nils Riedemann
    Hey folks, i have a large user Database (13k+), and for some reason i need to create random names. The users table has "first_name" and "last_name". Now i want to have 10 concats of full_name and last_name of two completely random rows. Is that even possible with SQL? My other idea was just to create a full_names and last_names table … but that would'nt be as much challenging. Oh, and it should not take up too much performance :) (so order by rand() is not an option ;))

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >