Created
February 19, 2014 13:01
-
-
Save xianyi/9091495 to your computer and use it in GitHub Desktop.
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
#include <stdio.h> | |
#ifndef unlikely | |
#ifdef __GNUC__ | |
#define unlikely(x) __builtin_expect(!!(x), 0) | |
#else | |
#define unlikely(x) (x) | |
#endif | |
#endif | |
#ifndef likely | |
#ifdef __GNUC__ | |
#define likely(x) __builtin_expect(!!(x), 1) | |
#else | |
#define likely(x) (x) | |
#endif | |
#endif | |
void blas_thread_init(){ | |
printf("ok\n"); | |
} | |
void main(int argc, char** argv) | |
{ | |
int i=0; | |
int blas_server_avail=0; | |
blas_server_avail=atoi(argv[1]); | |
if(unlikely(blas_server_avail==0)){ | |
i++; | |
blas_thread_init(); | |
} | |
i-=2; | |
printf("%d\n",i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment