GPU code
#9
Yes if you want to have functions of a reasonable size. Taking the example of the lighting code, PrepareBlockLight and CalcLight. PrepareBlockLight sets up the the initial seeds which CalcLight diffuses. Without partial computation the BlockLight values have to be written to memory and that flushes 2/3 of L1 cache on a pi, along with being ridiculously expensive on a GPU. Whereas if we can return the monad the computations can be pipelined. Another option is to just keep to single expression functions and use
Code:
#define RETURN(x) -> decltype(x) { return x; }
Reply
Thanks given by:


Messages In This Thread
GPU code - by worktycho - 06-05-2014, 08:18 PM
RE: GPU code - by xoft - 06-05-2014, 08:27 PM
RE: GPU code - by worktycho - 06-05-2014, 08:40 PM
RE: GPU code - by worktycho - 06-06-2014, 02:54 AM
RE: GPU code - by tigerw - 06-06-2014, 03:03 AM
RE: GPU code - by xoft - 06-06-2014, 03:25 AM
RE: GPU code - by worktycho - 06-06-2014, 03:38 AM
RE: GPU code - by xoft - 06-06-2014, 05:33 AM
RE: GPU code - by worktycho - 06-06-2014, 05:49 AM
RE: GPU code - by xoft - 06-09-2014, 05:39 AM
RE: GPU code - by worktycho - 06-09-2014, 06:05 AM
RE: GPU code - by xoft - 06-09-2014, 06:09 AM
RE: GPU code - by worktycho - 06-09-2014, 07:21 AM
RE: GPU code - by worktycho - 06-09-2014, 08:46 PM
RE: GPU code - by NiLSPACE - 06-12-2014, 02:00 AM
RE: GPU code - by xoft - 06-12-2014, 02:17 AM
RE: GPU code - by worktycho - 06-12-2014, 02:55 AM
RE: GPU code - by worktycho - 06-13-2014, 02:19 AM
RE: GPU code - by bearbin - 06-13-2014, 02:38 AM
RE: GPU code - by worktycho - 06-13-2014, 02:42 AM
RE: GPU code - by LO1ZB - 06-13-2014, 04:12 AM
RE: GPU code - by tigerw - 06-13-2014, 04:33 AM
RE: GPU code - by worktycho - 06-13-2014, 04:43 AM
RE: GPU code - by tigerw - 06-13-2014, 05:09 AM
RE: GPU code - by worktycho - 06-13-2014, 05:14 AM
RE: GPU code - by bearbin - 06-13-2014, 06:09 AM
RE: GPU code - by worktycho - 06-15-2014, 04:21 AM
RE: GPU code - by xoft - 06-15-2014, 04:39 AM
RE: GPU code - by worktycho - 06-15-2014, 04:43 AM
RE: GPU code - by xoft - 06-15-2014, 05:01 AM
RE: GPU code - by bearbin - 06-15-2014, 06:36 AM
RE: GPU code - by worktycho - 06-15-2014, 06:36 AM
RE: GPU code - by xoft - 06-15-2014, 06:42 AM
RE: GPU code - by worktycho - 06-15-2014, 06:55 AM
RE: GPU code - by xoft - 06-15-2014, 11:08 PM
RE: GPU code - by worktycho - 06-18-2014, 12:57 AM
RE: GPU code - by worktycho - 06-18-2014, 01:12 AM
RE: GPU code - by NiLSPACE - 06-18-2014, 01:17 AM
RE: GPU code - by worktycho - 06-18-2014, 01:21 AM
RE: GPU code - by NiLSPACE - 06-18-2014, 01:30 AM
RE: GPU code - by worktycho - 06-18-2014, 01:34 AM
RE: GPU code - by NiLSPACE - 06-18-2014, 01:35 AM
RE: GPU code - by worktycho - 06-18-2014, 01:36 AM
RE: GPU code - by worktycho - 06-18-2014, 05:27 AM
RE: GPU code - by bearbin - 06-18-2014, 05:41 AM
RE: GPU code - by worktycho - 06-18-2014, 06:03 AM
RE: GPU code - by worktycho - 06-19-2014, 05:39 AM
RE: GPU code - by LO1ZB - 06-19-2014, 09:12 AM
RE: GPU code - by NiLSPACE - 06-19-2014, 05:50 AM
RE: GPU code - by LO1ZB - 06-19-2014, 05:59 AM
RE: GPU code - by worktycho - 06-19-2014, 06:27 AM
RE: GPU code - by LO1ZB - 06-19-2014, 07:11 AM
RE: GPU code - by worktycho - 06-19-2014, 07:28 AM
RE: GPU code - by LO1ZB - 06-19-2014, 07:35 AM
RE: GPU code - by worktycho - 06-19-2014, 07:51 AM
RE: GPU code - by xoft - 06-19-2014, 04:33 PM
RE: GPU code - by worktycho - 06-19-2014, 10:07 PM
RE: GPU code - by xoft - 06-20-2014, 12:43 AM
RE: GPU code - by worktycho - 06-20-2014, 01:01 AM
RE: GPU code - by xoft - 06-20-2014, 01:06 AM
RE: GPU code - by worktycho - 06-20-2014, 01:10 AM
RE: GPU code - by xoft - 06-20-2014, 02:24 AM
RE: GPU code - by worktycho - 06-20-2014, 02:32 AM
RE: GPU code - by Schwertspize - 10-30-2015, 03:50 AM
RE: GPU code - by worktycho - 10-30-2015, 07:39 AM
RE: GPU code - by DiamondToaster - 10-30-2015, 10:04 AM



Users browsing this thread: 3 Guest(s)