Comments (6)
I forgot the other module:
module PortablePixmap where
data PixMap = Pixmap Integer Integer Int [(Int,Int,Int)]
createPixmap::Integer -> Integer -> Int -> [(Int,Int,Int)] -> PixMap
createPixmap width height max colours = Pixmap width height max colours
instance Show PixMap where
showsPrec prec (Pixmap x y z rgbs) = showHeader x y z . showRGB rgbs
showHeader::Integer -> Integer -> Int -> ShowS
showHeader x y z = showString "P6\n" . showBanner .
shows x . showReturn .
shows y . showReturn .
shows z . showReturn
showRGB::[(Int,Int,Int)] -> ShowS
showRGB [] = id
showRGB ((r,g,b):rest) = showChar (toEnum r) .
showChar (toEnum g) .
showChar (toEnum b) .
showRGB rest
showSpace = showChar ' '
showReturn = showChar '\n'
showBanner = showString "# Portable pixmap created by Haskell Program :\n" .
showString "#\tPortablePixmap.lhs (Jon.Hill 28/5/92)\n"
(this I took from the mandelbrot set generator in nofib, I should probably use Gloss for displaying the image instead)
from accelerate.
Strange that I had never run into this before. This should be fixed now, and I added the test to the examples package.
Thanks!
from accelerate.
For reference, here's a link to the new bit of doc:
from accelerate.
Would it be a solution to walk the AST (during or before convertAcc) and force all the input arrays, before doing anything with the context?
Wouldn't that be a built-in equivalent of the seq
Simon uses above? The Accelerate computation is strict in all the arrays that gets used, so I don't think this approach would force anything that isn't due to be forced anyway.
Shall we keep this issue open until a fix for the underlying issue is found? As Simon pointed out, behavior should not differ from the interpreter.
from accelerate.
I think this is actually in relation to #48, but yes, I see your point. If we make the right things strict in the library, the user shouldn't have to deal with adding seq
themselves.
from accelerate.
this issue was related to finalisers, migrate these comments to #48 which is about seq
and dependent computations.
from accelerate.
Related Issues (20)
- [BUG] Imperfect dead code elimination
- [BUG] Unexpectedly long phases when training a neural network HOT 1
- Support CUDA 11 HOT 1
- [BUG] CUDA-10 library doesn't support the Turing-based RTX 2060? HOT 8
- `inconsistent valuation @ shared 'Acc'` when trying to lift non-`Acc` function to `Acc` HOT 6
- `Foreign` instance for reference interpreter
- Is there a way to force accelerate operations to be sequentially evaluated? HOT 10
- [BUG] doc bugs
- Could not enable debugging options HOT 5
- Support GHCJS compilation HOT 7
- [BUG] Function hashes have incorrect length causing internal errors HOT 2
- [BUG] undefined symbol: _ZTIN4llvm10CallbackVHE HOT 4
- [BUG] Value 'sm_30' is not defined for option 'gpu-name' HOT 4
- [BUG] typo in Semigroup instance of Exp (Maybe a) HOT 1
- How to realise convolution? HOT 13
- [Tracking Issue] Implementing (Segmented) Single-Pass Look-Back Scans
- [BUG] Internal error in package accelerate and LLVM.PTX backend: CUDA Exception - misaligned address HOT 1
- [BUG] Runtime error with llvm-ptx backend: double free or corruption (!prev)
- [BUG] Library won't compile with debug flag when referenced by another project's cabal.project file. HOT 9
- [BUG] ptxas fatal error, sm_89 not defined for gpu-name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from accelerate.