os-70-350

os-70-350 Commit Details


Date:2013-12-08 21:52:36 (11 years 8 months ago)
Author:Natalie Adams
Branch:master
Commit:6b8dad3d23bf27231eff188b41c1ba5a59d8a1f1
Parents: 630cdc218ecd78372e0cc28b321079c25d318e36
Message:Adding bitmap example

Changes:

File differences

bitmap/main.c
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdint.h> /* for uint32_t */
#include <intrin.h>
int main()
{
unsigned int i = 0;
i |= 1 << 3; // or i |= 0x8; or i |= 8
for(unsigned int x = 0; x < 32; x++) // unsigned int = 32bits per ILP32
if ((i & (1 << x)) == i)
cout << x << endl;
return 0;
}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.37065s using 14 queries.