Code Monkey home page Code Monkey logo

imagina's People

Contributors

5e-324 avatar claudeha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

imagina's Issues

Crash when saving image

I have changed the image size to width/height of 788 but TextureWidth was 828 on my debug session
It is occurring on: RGBA rgba = ValToRGBA(FContext.pixelManager.Data[y * TextureWidth + x]);

This caused an out of bounds read at some point in the loop

Optimization in DPEvaluation

A small optimization can be done on DPEvaluation :
inside SRContext.EvaluateLA();

during the LA[j].Evaluate(temp, dz, dc);

if dc is 0 then some multiplications and additions can be ignored.
DC will be a complex at this point so it was already converted from FloatExp to double, which will result to a zero complex number. This will be 100% true on all deep zooms.
You can add a boolean on the beggining of DPEvaluation which checks dc for zero and then this boolean can be used inside SRContext.EvaluateLA() to use an overloaded function:
LA[j].Evaluate(temp, dz);

Potential issue on the multithreaded LA implementation

this part of the code:

if (ThreadID == ThreadCount - 1) {
LAI_.StepLength = j - PeriodBegin;
LAs[ThreadID].Append(LA_);
LAIs[ThreadID].Append(LAI_);
}

should be changed so the last thread to add those data should be the one who has PeriodBegin != 0 (this variable should be initialized to 0) and the next thread (if any) must have have PeriodBegin == 0. If the last thread has PeriodBegin !=0 then this thread should add the data.

This needs to be added so that the actual last thread that found the period should be the one to finalize the data.
This check should be added on the starter thread (thread 0) as well, so that the multithreaded code works even if you set the ThreadCount to 1.

Probably for this fix you need to add a new array, similar to Start, which stores the PeriodBegin for each thread, and to be initialized at -1, so you can do busy wait while the value is < 0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.