This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Challenge: | |
Implement selb with only using odd instructions on SPU. | |
---------------------------------------------------------------------------------- | |
input : mask (comes from a floating point compare so result is always zero or ones for each 32-bit value (and 4 of them)) | |
a, b to select between | |
---------------------------------------------------------------------------------- | |
Suggestion 1 by @daniel_collin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const char* s_mapPixelKernelSource = "\n" \ | |
"__kernel void mapPixel( \n" \ | |
" __global uchar* output, \n" \ | |
" __global uchar4* input, \n" \ | |
" __constant float4* pal, \n" \ | |
" const unsigned int palCount, \n" \ | |
" const unsigned int width) \n" \ | |
"{ \n" \ | |
" const int xOut = get_global_id(0); \n" \ | |
" const int yOut = get_global_id(1); \n" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OUTPUT_DIR := Data | |
INPUT_DIR := OriginalData | |
FOO_IN_FILES = $(wildcard $(INPUT_DIR)/Foo/*) | |
FOO_OUT_FILES = $(patsubst $(INPUT_DIR)/%, $(OUTPUT_DIR)/%, $(FOO_IN_FILES)) | |
$(FOO_OUT_FILES) : $(FOO_IN_FILES) | |
mkdir -p "$(@D)" | |
cp $< $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
item = xbmcgui.ListItem('testing', iconImage = 'DefaultVideo.png') | |
item.setInfo(type='video', infoLabels={ 'title': 'testing', 'Playcount': 1, 'overlay': 7 }) | |
xbmcplugin.addDirectoryItem(thisPlugin, 'temp.tmp', item, False) | |
xbmcplugin.endOfDirectory(thisPlugin) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun test-1 () 1) | |
(defun test-2 () 2) | |
(defun test-3 () 3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(genfuncs '(1 2 3)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro genfuncs (data) | |
`(progn | |
,@(loop for i in data collecting | |
`(defun test-,i () ,i)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def-spu-fun spu-fun (data :u32) | |
(spu-format "~d~%" data)) | |
(defun my-ppu-fun () | |
(spu-fun 0)) ; scheduling, etc is up to the implementation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def-vu0-fun vu0-fun (input1 :in vf01 | |
input2 :in vf02 | |
output :out vf03) | |
(add output input1 input2)) | |
(defun my-ee-fun () | |
; do something funky, set stuff etc and then call the code | |
(vu0-fun)) |
NewerOlder