Thread: Your work

  1. #1
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472

    Your work

    By way off following on from a previous discusion It would be interesting to hear what everyone is working on right now, whether professionally. at home or whatever
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    You might be interested in this slightly historical discussion, rogster001. What are you programming today?

  3. #3
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    bloomin eck thanks :-> reload tho innit ;-> cheers whiteflags
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  4. #4
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    my word whiteflags, what a thread link, The peers on this website, the fellow members, it is amazing to know that depth of quality is just who you are speaking to / discussing things with when u ask questions here
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  5. #5
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    I'm learning how to do batch processing in CUDA now.

    I've learned that in CUDA, global memory (the actual on-board memory of the chip, the 1 or 2 GB people pay for) is read in in 128 byte words. CUDA's unit of execution is a "warp" which is a set of threads being executed in lockstep.

    So every processor cycle, 32 threads are executed (well, only if they contain the same instructions for that cycle) which means if you want just one thread to do one read, you better make sure you have 31 other things you wanna read.

    What this basically translates into is me rearranging all my data into column-major order and learning how to arrange the data for the GPU on the CPU and then copy it to the GPU for execution. You can overlap a lot of this stuff though. You can have it so that you create mini pipelines of arrange->copy->execute whose execution timelines overlap.

    This seems like a lot of work but it's one of the few "good" solutions I've found to handling random access on the GPU because GPUs do not like random access. At all. If you want to write super slow code, you'll jump all over the place with your memory requests. Which is kind of what I was doing before but now I know better.

    So for reading a point set, it's no longer
    Code:
    x0 y0 z0 x1 y1 z1 x2 y2 z2 ....
    But now:
    Code:
    x0 x1 x2
    y0 y1 y2
    z0 z1 z2
    ...
    This way, I can actually have all threads in a warp read points in successfully with as few requests for global memory as possible.

    Most of my routines take 15 floats. Ugh. So many.

  6. #6
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    I'm still making a game engine with JavaScript. It is slow going, mostly because of differences between browsers. I just got the map parser done though (which parses Tiled Map Editor, .tmx files).

    Currently I'm trying to design something like an "AnimationMap" class to give greater control to objects working with my Sprite class. I want an AnimationMap to be something like this:
    Code:
    {
        imageName : "something",
        row : 9,
        firstFrame : 3,
        lengthInFrames : 4,
        eventTrigger : "keydown",
        tiggerValues : ["w", "up"]
    }
    The idea is that when the class that handles input receives an event of type 'eventTrigger' with any of the values recorded in the 'triggerValues' array, classes that have sprites can respond by executing the animations specified.

    The trickiest part is fitting this idea into all event types. For instance for 'mousemove' event types the trigger values could be an array of Vectors, or Rects (because you would be checking against an (x,y) Vector value of the cursor). So I think I should also accept callback functions as tiggerValues for 'mousemove'. When an event of that type happens, I call the callback function, passing it all the sprites coordinate information and the position of the cursor, and the callback function can decide if the animation is triggered. For example a callback function could be something like this:

    Code:
    function cursorToTheLeft (sprite, cursor) {
        if (sprite.position.x > cursor.x) {
            return true;
        }
        return false;
    }
    Then the trigger for the AnimationMap would be:

    Code:
    {
        ...
        eventType : "mousemove",
        triggerValues : [cursorToTheLeft]
    }
    I like this callback idea because it could apply to even weirder events that may be triggered by the code itself in the future, like 'collision' events (or whatever other events).
    WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;

  7. #7
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Can JavaScript multithread?

  8. #8
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    Quote Originally Posted by MutantJohn View Post
    Can JavaScript multithread?
    Not really, all your code is run in a single thread (afaik). The browser can load things asynchronously though, but in most cases there is a way to attach some callback to the loading of resources to trigger your code (so you don't try to use some resource that isn't loaded yet).
    WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;

  9. #9
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Hmm... How light is your game engine? I'm just wondering because I always feel bad for older CPUs who just can't keep up with what the gaming desktops run nowadays. Though it is a shame that JS doesn't seem to be multithreaded.

  10. #10
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    Quote Originally Posted by MutantJohn View Post
    Hmm... How light is your game engine? I'm just wondering because I always feel bad for older CPUs who just can't keep up with what the gaming desktops run nowadays. Though it is a shame that JS doesn't seem to be multithreaded.
    I can't really say as of yet (I don't have enough of it done). I don't think it should be that taxing though, I'm taking steps to limit what is being processed for any map (like no tiles rendering off screen, ect). I don't think performance should be much worse than flash games, but I'm curious about it too.
    WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;

  11. #11
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    I'm currently working with convolutional neural networks, to automatically segment MRI images of brains - labeling each voxel (3D pixel) with an anatomical region of the brain. This has applications in things like Alzheimer's diagnosis, where the physician needs to be able to see shape and size of specific parts of the brain, that may be buried deep inside the scan.

  12. #12
    spaghetticode
    Guest
    I have been working on a hangman-like word guessing game with Python and PyQt lately (I'm a hobby programmer). Recently I took another approach on learning C++ (I start playing around with it every couple of months but yet I have never been persistant enough to learn enough for coping with a serious project). I like the syntax, though, and I have fun working with the language, regardless of my poor progress. Python is fun too and I have made way more progress in that language, but still, C++ is my secret love. In addition to working through my text book, I try to put together a simple dice game which I extend along my path through my textbook.
    Last edited by spaghetticode; 03-25-2015 at 01:50 AM. Reason: typo

  13. #13
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Quote Originally Posted by cyberfish View Post
    I'm currently working with convolutional neural networks, to automatically segment MRI images of brains - labeling each voxel (3D pixel) with an anatomical region of the brain. This has applications in things like Alzheimer's diagnosis, where the physician needs to be able to see shape and size of specific parts of the brain, that may be buried deep inside the scan.
    Interesting. I'd love to read about how this is all done but I'm sure that must be kept on the downlow.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    This sounds like I'm bragging or something it feels like, but in the light that some other people are posting what they're currently working on, I guess I might just as well share my master thesis description.

    Quote Originally Posted by Master thesis
    The goal of the thesis is to construct a multimedia switch that has N HDMI inputs and M HDMI outputs. Furthermore, it has n analogue inputs and m analogue outputs. The purpose of the switch is to take the inputs (both the HDMI and the analogue inputs) and make them appear on one or more of the outputs.

    Furthermore, it should be possible to take any of the audio inputs (from both HDMI and the analogue inputs) and make them appear on any of the outputs (both the HDMI and analogue outputs). If multiple audio streams appear on the same output, the audio signals should be muxed together. It should also be possible to change the volume of any of the output audio signals.

    The goal is that all of this should be controllable via a computer through some API (e.g. a computer can say take HDMI input A and analogue input a and send them to output B, while lowering the volume by half).

    Last, but not least, one or more companion wireless adapters should be made that can take an analogue audio signal or an HDMI signal and transfer it wirelessly to the multimedia switch. Furthermore, a wireless adapter that can wirelessly accept a HDMI signal and wireless audio signal and output them via an HDMI port and an analogue audio port.
    Is this going to bite me in the ass? I wonder...

    EDIT: I did it. Now I feel terrible. Wonder how it feels tomorrow?
    Last edited by Elysia; 03-25-2015 at 12:10 PM.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Quote Originally Posted by MutantJohn View Post
    Interesting. I'd love to read about how this is all done but I'm sure that must be kept on the downlow.
    Everything is publicly accessible! This one is my master research.

    If you are interested in machine learning, there are awesome courses available on Coursera. After you get the basics down, you'll be able to understand a lot of the papers on artificial neural networks, and there are a lot of very cool techniques people are using.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why did this not work????
    By mohnish_khiani in forum C Programming
    Replies: 16
    Last Post: 02-26-2011, 04:16 AM
  2. Could this work?
    By stormdizzle in forum C++ Programming
    Replies: 7
    Last Post: 08-08-2010, 04:42 PM
  3. Will this set up work?
    By adr in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-09-2007, 02:08 PM
  4. Can anyone get this to work ?
    By slx47 in forum C++ Programming
    Replies: 11
    Last Post: 05-10-2002, 08:35 PM
  5. my function doesn't work! it should work
    By Unregistered in forum C Programming
    Replies: 13
    Last Post: 05-02-2002, 02:53 PM