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
// clang -Ofast -o dgemm_sse dgemm_sse.c | |
// http://apfel.mathematik.uni-ulm.de/~lehn/sghpc/gemm/page02/index.html | |
#ifdef _MSC_VER | |
#include <intrin.h> | |
#else | |
#include <x86intrin.h> | |
#endif | |
#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 201102L |
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 <boost/noncopyable.hpp> | |
#include <pthread.h> | |
#include <stdlib.h> | |
// a superfluous check for pedantic people | |
inline void CHECK_SUCCESS(int ret) | |
{ | |
if (ret != 0) | |
{ | |
abort(); |
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
#ifndef _LINUX_LIST_H | |
#define _LINUX_LIST_H | |
#include <stdio.h> | |
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) | |
/** | |
* container_of - cast a member of a structure out to the containing structure | |
* @ptr: the pointer to the member. |
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
// Sample custom iterator. | |
// By perfectly.insane (http://www.dreamincode.net/forums/index.php?showuser=76558) | |
// From: http://www.dreamincode.net/forums/index.php?showtopic=58468 | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <iterator> | |
#include <cassert> |