- 是非 1 for each, total 10 points
- 選擇 2 for each, total 6 points
- 簡答 3 for each, total 33 points
- bonus 好多分
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
//////////////////////////////////////////// | |
// file: ~xatier/work/lib/clwrapper.c | |
//////////////////////////////////////////// | |
// openCL doc | |
// http://www.khronos.org/registry/cl/specs/opencl-2.0.pdf | |
// http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/ | |
// page 164 | |
void * clSVMAlloc (cl_context context, cl_svm_mem_flags flags, size_t size, unsigned int alignment) { |
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
#!/usr/bin/env perl | |
use 5.014; | |
use URI::Escape; | |
use WWW::Mechanize; | |
use List::MoreUtils qw(uniq); | |
use utf8; | |
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
#!/usr/bin/env python3 | |
import functools | |
class LFSR: | |
def __init__(self, length, clocking, tapped): | |
self.reg = [0] * length | |
self.clocking = clocking | |
self.tapped = list(tapped) |
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> | |
int main (void) { | |
int total, a, b, c, i; | |
int mem[100]; | |
total = 0; | |
c = 20 // addi $6, $0, 20 | |
mem[0] = 1; // addi $1, $0, 1 | |
mem[1] = 2; // addi $7, $0, 2 | |
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
#!/usr/bin/env perl | |
use 5.014; | |
use Google::Search; | |
my $search = Google::Search->Web( query => "site:example.com something interesting" ); | |
while ( my $result = $search->next ) { | |
my $url = $result->uri; | |
# url processing ? |
The OpenCL Runtime
Command queues
_command_queue clCreateCommandQueueWithProperties (cl_context context, cl_device_id device, cl_queue_properties *properties, cl_int *errcode_ret)
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
$ cat ~/.juniper_networks/network_connect/ncsvc.log | grep etc | |
20131120212711.288073 ncsvc[p6033.t6033] sysdeps.error rename /etc/jnpr-nc-resolv.conf => /etc/resolv.conf failed wirh error 2 (sysdeps.cpp:942) | |
20131120212711.288127 ncsvc[p6033.t6033] sysdeps.error rename /etc/jnpr-nc-hosts.bak => /etc/hosts failed wirh error 2 (sysdeps.cpp:946) | |
20131120212744.257773 ncsvc[p6135.t6135] sysdeps.error rename /etc/jnpr-nc-resolv.conf => /etc/resolv.conf failed wirh error 2 (sysdeps.cpp:942) | |
20131120212744.257855 ncsvc[p6135.t6135] sysdeps.error rename /etc/jnpr-nc-hosts.bak => /etc/hosts failed wirh error 2 (sysdeps.cpp:946) | |
20131120212811.467972 ncsvc[p6175.t6175] sysdeps.error rename /etc/jnpr-nc-resolv.conf => /etc/resolv.conf failed wirh error 2 (sysdeps.cpp:942) | |
20131120212811.468016 ncsvc[p6175.t6175] sysdeps.error rename /etc/jnpr-nc-hosts.bak => /etc/hosts failed wirh error 2 (sysdeps.cpp:946) | |
20131120212903.159599 ncsvc[p6252.t6252] sysdeps.error rename /etc/jnpr-nc-resolv.conf => /etc/resolv.conf failed |
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
#!/usr/bin/env perl | |
use 5.014; | |
use WWW::Mechanize; | |
# feed me a url like this! | |
my $url = "http://eden.komica.org/00/src/"; | |
my $mech = WWW::Mechanize->new(); |