This file contains 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
""" | |
Prints the nodes queue, | |
please note that the queue is actually a stack, sorted reversely. | |
Elements are extracted using `pop()` for ease of implementation which | |
is relatively the same as using a real queue and removing this first element, | |
Except that the first approach takes only one instruction. | |
""" | |
def printQueue(queue): | |
counter = len(queue) |
This file contains 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
#include <xmmintrin.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
void __attribute__ ((noinline)) SSE(){ | |
int len = 1024; | |
float data1 [1024] = {1, 2, 3, 4, 5, 6, 7, 8}; | |
float data2 [1024] = {1, 2, 3, 4, 5, 6, 7, 8}; | |
float dest[1024]; |
This file contains 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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#define bin(name, t) void name(t n, uint8_t* dest) { \ | |
size_t size = sizeof(t) * 8;\ | |
t counter = 0;\ | |
while(n){\ | |
if(n & 1) \ | |
dest[counter] = '1';\ |
NewerOlder