straylight | European Space Agency , achieving significant speedups | GPU library
kandi X-RAY | straylight Summary
kandi X-RAY | straylight Summary
Note: complete blog post about this [is here] This is the software I developed for Task 2.2 of the "TASTE Maintenance and Evolutions" project of the European Space Agency. It is a port of the IDL implementation of the StrayLight algorithm to C, and it utilizes OpenMP, Eigen and CUDA to achieve much better speeds than the original IDL code (execution time in gdl: 18 seconds - execution time of my C code: 169 ms).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of straylight
straylight Key Features
straylight Examples and Code Snippets
Community Discussions
Trending Discussions on straylight
QUESTION
For practicing reasons, I am working on Advent of Code 2015, and I am stuck at day 9. The goal is to find the shortest distance, while visiting every location within the graph exactly once. Every point is directly connected to each other and the end point must be different from the starting point. I have formulated a solution, but the final value is not correct, and I am not seeing the underlying problem.
First, I create a graph object with the locations and the distances. Then I collect every permutation of the locations into a list, and then I find and summarize the distances for each permutation. Finally, I print out the minimum distance value, which is the solution to the exercise.
The code:
...ANSWER
Answered 2020-Sep-01 at 22:56I have found the error thanks to Setonix's comment! Turns out, the approach is working (it is most probably nowhere near a nice implementation of TSP, as mentioned by Mark Ransom, but it is functional nonetheless!), I was only careless, when defining the set of locations.
I have assumed that every location is present at least once in the beginning of the instruction strings. However, one location ("Arbre") was only present at the end of the instructions. Therefore, the graph was incomplete, hence the wrong outputs.
As a quick fix, I have modified the code in the following way:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install straylight
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page