text:
## C Specification

To allocate a shared virtual memory buffer (referred to as a SVM buffer) that can be shared by the host and all devices in an OpenCL context that support shared virtual memory, call the function

void* clSVMAlloc(
cl_context context,
cl_svm_mem_flags flags,
size_t size,
cl_uint alignment);

## Parameters

• context is a valid OpenCL context used to create the SVM buffer.

• flags is a bit-field that is used to specify allocation and usage information. The SVM Memory Flags table describes the possible values for flags.

• size is the size in bytes of the SVM buffer to be allocated.

• alignment is the minimum alignment in bytes that is required for the newly created buffers memory region. It must be a power of two up to the largest data type supported by the OpenCL device. For the full profile, the largest data type is long16. For the embedded profile, it is long16 if the device supports 64-bit integers; otherwise it is int16. If alignment is 0, a default alignment will be used that is equal to the size of largest data type supported by the OpenCL implementation.

## Description

Table 1. List of supported SVM memory flag values
cl_svm_mem_flags Description

CL_MEM_READ_WRITE

This flag specifies that the SVM buffer will be read and written by a kernel. This is the default.

CL_MEM_WRITE_ONLY

This flag specifies that the SVM buffer will be written but not read by a kernel.

Reading from a SVM buffer created with CL_MEM_WRITE_ONLY inside a kernel is undefined.

CL_MEM_READ_WRITE and CL_MEM_WRITE_ONLY are mutually exclusive.

CL_MEM_READ_ONLY

This flag specifies that the SVM buffer object is a read-only memory object when used inside a kernel.

Writing to a SVM buffer created with CL_MEM_READ_ONLY inside a kernel is undefined.

CL_MEM_READ_WRITE or CL_MEM_WRITE_ONLY and CL_MEM_READ_ONLY are mutually exclusive.

CL_MEM_SVM_FINE_GRAIN_BUFFER

Missing before version 2.0.

This specifies that the application wants the OpenCL implementation to do a fine-grained allocation.

CL_MEM_SVM_ATOMICS

Missing before version 2.0.

This flag is valid only if CL_MEM_SVM_FINE_GRAIN_BUFFER is specified in flags. It is used to indicate that SVM atomic operations can control visibility of memory accesses in this SVM buffer.

If CL_MEM_SVM_FINE_GRAIN_BUFFER is not specified, the buffer can be created as a coarse grained SVM allocation. Similarly, if CL_MEM_SVM_ATOMICS is not specified, the buffer can be created without support for SVM atomic operations (refer to an OpenCL kernel language specifications).

Calling clSVMAlloc does not itself provide consistency for the shared memory region. When the host cannot use the SVM atomic operations, it must rely on OpenCLs guaranteed memory consistency at synchronization points.

For SVM to be used efficiently, the host and any devices sharing a buffer containing virtual memory pointers should have the same endianness. If the context passed to clSVMAlloc has devices with mixed endianness and the OpenCL implementation is unable to implement SVM because of that mixed endianness, clSVMAlloc will fail and return NULL.

Although SVM is generally not supported for image objects, clCreateImage may create an image from a buffer (a 1D image from a buffer or a 2D image from buffer) if the buffer specified in its image description parameter is a SVM buffer. Such images have a linear memory representation so their memory can be shared using SVM. However, fine grained sharing and atomics are not supported for image reads and writes in a kernel.

clSVMAlloc returns a valid non-NULL shared virtual memory address if the SVM buffer is successfully allocated. Otherwise, like malloc, it returns a NULL pointer value. clSVMAlloc will fail if

• context is not a valid context.

• flags does not contain CL_MEM_SVM_FINE_GRAIN_BUFFER but does contain CL_MEM_SVM_ATOMICS.

• Values specified in flags do not follow rules described for supported values in the SVM Memory Flags table.

• CL_MEM_SVM_FINE_GRAIN_BUFFER or CL_MEM_SVM_ATOMICS is specified in flags and these are not supported by at least one device in context.

• The values specified in flags are not valid, i.e. don’t match those defined in the SVM Memory Flags table.

• size is 0 or > CL_DEVICE_MAX_MEM_ALLOC_SIZE value for any device in context.

• alignment is not a power of two or the OpenCL implementation cannot support the specified alignment for at least one device in context.

• There was a failure to allocate resources.


text:
Universal covering

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
A covering $p:X\rightarrow Y$ of a space $Y$ is subordinate to a covering $p':X'\rightarrow Y$ if there is a covering $f:X'\rightarrow X$ such that $p'=pf$.

format: plain


text:
CSES Problem Set

# Bit Problem

CSES - Bit ProblemCSES - Bit Problem

 Time limit: 1.00 s Memory limit: 512 MB

Given a list of $n$ integers, your task is to calculate for each element $x$:
1. the number of elements $y$ such that $x \mid y = x$
2. the number of elements $y$ such that $x \mathrel{\&} y = x$
3. the number of elements $y$ such that $x \mathrel{\&} y \neq 0$
Input

The first input line has an integer $n$: the size of the list.

The next line has $n$ integers $x_1,x_2,\dots,x_n$: the elements of the list.

Output

Print $n$ lines: for each element the required values.

Constraints
• $1 \le n \le 2 \cdot 10^5$
• $1 \le x_i \le 10^6$
Example

Input:
5 3 7 2 9 2

Output:
3 2 5 4 1 5 2 4 4 1 1 3 2 4 4


text:
# Element prime order (EPO) group

A finite group $G$ is called EPO-group if every non-identity element of $G$ has prime order.

For a given finite group $G$, let $\pi (G)$ denote the set of all prime divisors of $|G|$.

Does there exist non-isomorphic EPO-groups $G_1$, $G_2$ of same order with $|\pi(G_i)|\geq 2$ , $i=1,2$ ?

The smallest examples are the groups denoted (147,4) and (147,5) in the SmallGroups library. They are both semidirect products $Z_7^2:Z_3$.


text:
## Arithmetic and Geometric Mean

The terms 'arithmetic mean' and 'geometric mean' are derived naturally from the definition of arithmetic series and geometric series respectively.

Successive terms in an arithmetic sequence are defined bywhereis the common difference. We addto each term to get the next term. This means thatso that

Any term is the arithmetic mean of the term immediately preceding and the term immediately succeeding that term.

We can generalise this to any odd number of termsThe middle term is the arithmetic mean of the terms immediately preceding and the terms immediately succeeding:

In turn this can be generalized in the obvious way to an even number of terms.

Successive terms in an geometric sequence are defined bywhereis the common ratio. We multiply each term byto get the next term. This means thatandso that

From this we obtain

This equation says that any term is the geometric mean of the term immediately preceding and the term immediately succeeding that term.

We can generalise this to any odd number of terms,The middle term is the geometric mean of the terms immediately preceding and the terms immediately succeeding:

In turn this can be generalized in the obvious way to an even number of terms.

In fact a sequence can be any list ofnumbers. The arithmetic mean is just the sum of all the terms divided by the number of terms and the geometric mean is just the nth root of the product of the terms.


text:
Linux Foundation Wiki

project collaboration site

Site Tools

driver-backport:kmp_macros

KMP Macros

Contents

Purpose This page will eventually provide an “API Reference” for the macros used to build KMPs with the standard spec file on https://www.linux-foundation.org/en/Sample_KMP_spec_file . Process

1. Work through the “Current Issues below.
2. Fill in the “KMP Macros - API Reference” section below.

Current Issues

1. Can we agree to just call the main macro %kernel_module_package?
2.  %kernel_module_package macro needs to include an option to the macro that specifies the pciid that gets installed in a standard location when the KMP is installed.
3. We need an option that specifies the firmware file that gets installed in a standard location when the KMP is installed.
4. We need an option that specifies that the modules in the KMP get added to the initrd when installed.
5. Can we pull the explicit %package KMP stuff (in the SUSE spec file) into %suse_kernel_module_subpackage? Or can we just remove it from the spec file? (Removing it would eliminate the ability for SUSE subpackages to have a different summary and description from the main package.)
6. Can we invent %make_build and %make_install macros that take flavor as an argument? That will hide the details of the make command behind the macros.
7. Can we invent an %install_mod macro to handle INSTALL_MOD_PATH and INSTALL_MOD_DIR?

Proposed Standard KMP Macros

kernel_module_package_buildreqs

Should evaluate to: Everything needed for “BuildRequires”.

SUSE needs to change kernel_module_package_buildreq to kernel_module_package_buildreqs and update “build” so that it can handle this macro. kernel_source() - Already Works on SUSE and Red Hat Should evaluate to: Directory containing top-level kernel Makefile (used in “make -C %{kernel_source \$flavor} modules M=\$PWD/obj/\$flavor”) _kermoddir Should evaluate to: Directory for installed modules. I.e., SUSE would evaluate to “updates”, Red Hat would evaluate to “updates/%name”.

Suggested macro for SUSE to add to /usr/lib/rpm/macros:

`    %_kermoddir(n:) %{expand:%(echo "updates")}`

Suggested macro for Red Hat to add to /usr/lib/rpm/redhat/macros:

```     %_kermoddir(n:) %{expand:%( \


text:
# protected file

Discussion in 'Coby Generation 1' started by Vernon17, Jan 6, 2011.

1. ### Vernon17Member

Joined:
Sep 6, 2010
Messages:
58
1
Trophy Points:
72
Location:
Center of Utah in the USA
Tablet / Device:
Treo Pro for now
I downloaded Z4root 1.3.0 on my PC. I put it on my micro sd card. I put the card in my tablet. I find the file with the file manager. I tap on it to install it but I get the message that the file is protected and cannot be opened.

I tried this with another file I had on the card and I got the same message about that file.
Maybe this is a card issue?
I formated the card and tried again with only the Z4 file on the card but I got the same message.

Any ideas?

2. ### l_nSenior Member

Joined:
Dec 28, 2010
Messages:
788
99
Trophy Points:
102
Location:
TN, USA
Tablet / Device:
Mid7015
do you have the android sdk installed on your PC? if so, go download a copy of SuperUser.apk, su, and busybox. then run the following from a command prompt on your computer (i'm going to assume you already know how to run adb):
Code:
(if on linux, do this first:
)

(this should bring up a # prompt)
chmod 0644 /system/app/SuperUser.apk
chmod 0755 /system/xbin/su
chmod 0755 /system/xbin/busybox
sync
exit
your device should then be rooted.

3. ### Vernon17Member

Joined:
Sep 6, 2010
Messages:
58
1
Trophy Points:
72
Location:
Center of Utah in the USA
Tablet / Device:
Treo Pro for now
this all worked out. Once i had the proper file manager called mmaapp then I was able to install these files.
It would seem that not all file manager programs do the same things.
make sure you use the mmaapp if you are wanting to follow the instructions for rooting the device.

4. ### BKenneyMember

Joined:
Dec 10, 2010
Messages:
138
5
Trophy Points:
87
Location:
Florida
Tablet / Device:
Coby Kyros MID7015
I also believe the protection error occurs if you don't set the device to allow unknown sources for installation. Maybe I'm wrong but

Under Settings>Applications "Unknown Sources" Should be checked before attempting to root.

Also Under Settings>Applications>Development "USB Debugging" and "Allow Mock Locations" Should also be checked!


text:
#### 9th Standard Maths English Medium Free Online Test 1 Mark Questions 2020 - 2021 Part - Four

9th Standard

Reg.No. :
•
•
•
•
•
•

Maths

Time : 00:15:00 Hrs
Total Marks : 15

Part A

15 x 1 = 15
1. If n(A U B U C) = 100, n(A) = 4x, n(B) = 6x, n(C) = 5x, n(A ∩ B) = 20, n(B ⋂C) = 15, n(A C) = 25 and n(A ⋂ B ⋂ C) = 10 , then the value of x is

(a)

10

(b)

15

(c)

25

(d)

30

2. If A,B,C are non-overlapping sets,then n $\left( A\cap B\cap C \right)$ is ___________

(a)

n(A) + n(B) + n(C)

(b)

$n\left( A\cup B\cup C \right)$

(c)

0

(d)

$n\left( A\cap B \right)$

3. The value of $\bar { 0.03 }$ +$\bar { 0.03 }$  is ___________.

(a)

$\bar { 0.09 }$

(b)

$\bar { 0.09 }$

(c)

$\bar { 0.09 }$

(d)

0

4. $\sqrt{27}$+$\sqrt{12}$=

(a)

$\sqrt{39}$

(b)

5$\sqrt{6}$

(c)

5$\sqrt{3}$

(d)

3$\sqrt{5}$

5. Let the polynomials be (A)–13q5 + 4q2 + 12q (B)(x2 +4 )(x2 + 9) (C)4q8 – q6 + 2 (D)-$\frac {5}{7}$y12+y3+y5
Then ascending order of their degree is

(a)

A,B,D,C

(b)

A,B,C,D

(c)

B,C,D,A

(d)

B,A,C,D

6. Which of the following has a factor?

(a)

x+ 2x

(b)

(x - 1)2

(c)

(x + 1)2

(d)

(x- 22)

7. Orthocentre of a triangle is the point of concurrency of _______

(a)

medians

(b)

altitudes

(c)

angle bisectors

(d)

perpendicular bisectors of side

8. PQ and RS are two equal chords of a circle with centre O such that ㄥPOQ=70°, then ㄥOR

(a)

60°

(b)

70°

(c)

55°

(d)

80°

9. If the points A (2,0), B (-6,0), C (3, a–3) lie on the x-axis then the value of a is _____

(a)

0

(b)

2

(c)

3

(d)

-6

10. The centre of a circle is (0, 0). One end point of a diameter is (5, -1), then ______________

(a)

$\sqrt{24}$

(b)

$\sqrt{37}$

(c)

$\sqrt{26}$

(d)

$\sqrt{17}$

11. The mean of the square of first 11 natural numbers is

(a)

26

(b)

46

(c)

48

(d)

52

12. The mean of set of numbers is $\bar{x}$ If each number is multiplied by z, the mean is

(a)

$\bar{X}+z$

(b)

$\bar{X}-z$

(c)

$z\bar{X}$

(d)

$\bar{X}$

13. The value of $\frac { 1-{ tan }^{ 2 }{ 45 }^{ 0 } }{ 1+{ tan }^{ 2 }{ 45 }^{ 0 } }$

(a)

2

(b)

1

(c)

0

(d)

$\frac { 1 }{ 2 }$

14. The capacity of a water tank of dimensions 10 m × 5 m × 1.5 m is

(a)

75 litres

(b)

750 litres

(c)

7500 litres

(d)

75000 litres

15. A collection of one or more outcomes of an experiment is called

(a)

Event

(b)

Outcome

(c)

Sample point

(d)

None of the above


text:
# What properties “should” spectrum of noncommutative ring have?

There are already a lot of discussion about the motivation for prime spectrum of commutative ring. In my perspective(highly non original), there are following reasons for the importance of prime spectrum.

1. $\text{Spec}(R)$ is the minimal spectrum containing $\text{Spec}_{\rm max}(R)$ which has good functoriality which means the preimage of a prime ideal is still a prime ideal.

2. if $p\in \text{Spec}(R)$, then $S_{p} = R-p$ is multiplicative set. Then one can localize.

3. $S_{p}^{-1}R$ for $p\in \text{Spec}(R)$ is a local ring (has unique maximal ideal which is equivalent to have unique isomorphism class of simple modules). Local ring is easy to deal with and the maximal ideal can be described in explicitly, i.e $m=S_p^{-1}p$

(My advisor told me P.Cartier pushed Grothendieck to built commutative algebraic geometry machinery based on prime spectrum and the reasons mentioned above are the reasons they used prime spectrum)

Addtional reason: one can have good definitions of topological space and a structure sheaf on it so that one can recover this commutative ring back as its global section

Now, my question is for the people coming from commutative world, what other properties do you expect the spectrum of a noncommutative ring should have?

I am aware that people are coming from different branches, there might be various kinds of noncommutative ring arising in your study. Therefore, the question for people coming from different branches of mathematics is that which kind of noncommutative ring do you meet and what properties do you feel that the spectrum of noncommutative ring should have to satisfy your need?

The main motivation for me to ask this question is I am learning noncommutative algebraic geometry. In the existence work by Rosenberg, there are several kinds of spectrum(at least six different spectrum) for different purposes and they satisfy the analogue properties(noncommutative version)I mentioned above and coincide with prime spectrum when one impose the condition of commutativity. I wonder check whether these spectrum satisfied the other reasonable demand

-
I cleaned up some TeX. In particular, \in is preferable to \epsilon. –  Theo Johnson-Freyd Feb 15 '10 at 17:15
I found the following short paper very readable, and it describes the various similarities and differences between commutative and non-commutative (algebraic) geometry: math.brown.edu/~noahgian/files/NCG.pdf –  Aaron Mazel-Gee Oct 31 '11 at 9:41

I know almost nothing about noncommutative rings, but I have thought a bit about what the general concept of spectra might or should be, so I'll venture an answer.

One other property you might ask for is that it has a good categorical description. I'll explain what I mean.

The spectrum of a commutative ring can be described as follows. (I'll just describe its underlying set, not its topology or structure sheaf.) We have the category CRing of commutative rings, and the full subcategory Field of fields. Given a commutative ring $A$, we get a new category $A/$Field: an object is a field $k$ together with a homomorphism $A \to k$, and a morphism is a commutative triangle. The set of connected-components of this category $A/$Field is $\mathrm{Spec} A$.

There's a conceptual story here. Suppose we think instead about algebraic topology. Topologists (except "general" or "point-set" topologists) are keen on looking at spaces from the point of view of Euclidean space. For example, a basic thought of homotopy theory is that you probe a space by looking at the paths in it, i.e. the maps from $[0, 1]$ to it. We have the category Top of all topological spaces, and the subcategory Δ consisting of the standard topological simplices $\Delta^n$ and the various face and degeneracy maps between them. For each topological space $A$ we get a new category Δ$/A$, in which an object is a simplex in $A$ (that is, an object $\Delta^n$ of Δ together with a map $\Delta^n \to A$) and a morphism is a commutative triangle. This new category is basically the singular simplicial set of $A$, lightly disguised.

There are some differences between the two situations: the directions have been reversed (for the usual algebra/geometry duality reasons), and in the topological case, taking the set of connected-components of the category wouldn't be a vastly interesting thing to do. But the point is this: in the topological case, the category Δ$/A$ encapsulates

how $A$ looks from the point of view of simplices.

In the algebraic case, the category $A/$Field encapsulates

how $A$ looks from the point of view of fields.

$\mathrm{Spec} A$ is the set of connected-components of this category, and so gives partial information about how $A$ looks from the point of view of fields.

-
Interesting answer, but it does not deal with noncommutative rings (which was the question). –  Martin Brandenburg Oct 25 '10 at 11:29
For a non-commutative ring $A$, one might replace Field be some meaningful full subcategory of test objects in Ring. A naive first thought would be skewfields. –  Rasmus Bentmann Jul 25 '12 at 17:23

I know this question is old, and has an accepted answer, but this excellent paper by Manny Reyes gives some further thoughts about possible Spec's for noncommutative rings.

-


text:
# group scheme neither affine, nor an abelian variety

Does there exist a group scheme of finite type over a field $k$ , which is neither affine, nor an abelian variety?

-
Related entry: mathoverflow.net/questions/43529/… –  Zoran Skoda May 18 '11 at 13:22
As my answer indicates, it's unclear precisely what you mean by your parenthetic statement. Being an affine group scheme doesn't imply having a realization as a matrix group. Certainly you want to consider the motivating examples mentioned in Brian Conrad's cited paper. –  Jim Humphreys May 18 '11 at 20:26

Yes, take a product of an abelian variety with an affine group scheme...

-
But at least, we have something close to that. See en.wikipedia.org/wiki/Chevalley_theorem. –  Marc Palm May 18 '11 at 10:18
The ground field is required to be perfect in the Chevalley theorem. –  Zoran Skoda May 18 '11 at 13:21

For me the most natural examples to think about are those coming from linear algebraic groups in prime characteristic, in the form of Frobenius kernels. These are extensively treated in Jantzen's book Representations of Algebraic Groups, with foundations laid in Part I. Concretely, you can start with the restricted universal enveloping algebra of the Lie algebra of such a group and associate to it naturally a finite group scheme. This is only the "first" Frobenius kernel.

Examples of this kind are "affine" but not linear algebraic groups.

Perhaps more in the spirit of the question, natural examples occur in connection with Chevalley's classical structure theorem: for a modern treatment see B. Conrad, "A modern proof of Chevalley's theorem on algebraic groups", J. Ramanujan Math. Soc. 17 (2002).

-

The type of Jacobian (generalised) discussed in Serre's book "Groupes algébriques et corps de classes" provides a large class of examples. They arise, in a sense, from the universality of the Albanese variety when extended to non-regular differentials.

-


text:
# Chlorophyll: Synthesis-Aided Compiler for Low-Power Spatial Architectures

As energy efficiency is becoming a major concern in modern processor design, a spatial architecture with simple interconnects turns out to be an attractive design choice due to its high energy dedication to computation. The GreenArrays GA144 is an example of a low-power spatial processor, consisting of multiple simple identical cores on one chip. Naturally, energy efficiency comes at some expenses, which usually include limited programmability. GA144 originally can only be programmed at low-level stack-based language, and programs will need to be meticulously partitioned and laid out onto each core, presenting non-trivial challenges to programmers and compiler designers.

Chlorophyll is a synthesis-aided programming model targeting GA144. This work tackles the challenges exposed by designing an efficient compiler for a specific spatial processor, but the methodology can inspire similar approaches to other processors.

## Motivation

One important motivation is the poor programmability of GA144. GA144 incorporates radical architectural design decisions, for example, simple interconnects, no message buffers, and tiny storage capacity, forcing programmers to carefully partition data and instructions, and manually handle communication code among cores. Moreover, GA144 is developed in ArrayForth, a low-level stack-based language, so it takes some learning effort for programmers who are only familiar with the main-stream register-based systems.

Rewrite-based classical compilers are not able to bridge the abstraction gap of programming difficulties presented by low-power spatial architectures. The reason is two-fold: it’s time-consuming to design an optimized compiler for the target hardware, and the hardware architecture itself is evolving rapidly. Instead of rewriting a program, synthesis-based compilers search for an implementation given some specifications. Chlorophyll abstracts away tedious low-level stack-based programming efforts from programmers, but it does not mean that the generated program is out of human intervention. Programmers are granted the privilege to provide high-level inputs such as partitioning key data structures and code.

## Solving the Subproblem Chain

The biggest problem of implementing a synthesis-based compiler is that it may not scale to large programs. Chlorophyll decomposes the problem of compiling a high-level program to spatial machine code into four subproblems: partitioning, layout and routing, code separation, and code generation. While these problems are difficult for traditional compilers, synthesis-based techniques can naturally solve these consecutive subproblems and thus the methods can apply to large, practical applications.

### Partitioning

Chlorophyll extends a simple type system to simplify reasoning about partitioning and to avoid explicit communication code. The partitioning subproblem takes input source programs with partition annotations which specify the logical core where code and data reside. The input does not need to contain all annotations - actually most data and operators can be unannotated. For example, in this input program

  int@0 mult(int x, int y) { return x * y;}

there are no annotations on the locations of variables x, y and the operation *. The synthesizer will infer all unspecified partitions, and output a fully annotated program with the minimized amount of messages among partitions. Here is one possible mapping:

  int@0 mult(int@2 x, int@1 y) { return (x!1 *@1 y)!0;}

Details on typing rules can be found in Figure 2 in the paper. The extended type system enables the type inference of unannotated partition types, which is essentially the job of the partitioning synthesizer. To infer the unannotated partition types, two cost models are constructed to guide the search of design space, the communication interpreter estimates the number of communications needed and the partition space checker ensures the code and data fit in the memory space for each core. For example, the send operation ! increases the communication amount by 1, and consumes the memory space with the size of the sending operand. As for control statements, since it is necessary for each body partition of a control flow to access the result of the control expression locally in order to reduce the amount of communications, the evaluated control logic value will be sent to all the body partitions. Therefore, conditional statements will add the communication amount by the number of body partitions, and the condition expression takes up the memory space in all body partitions.

The communication count interpreter and the partition space checker are implemented using Rosette, a language for building light-weight synthesizers. For partially annotated programs, unspecified partition annotations will be represented as a symbolic variable, and Rosette’s back-end solver will search for a set of assigned partitions under the constraints of communication count and memory space. The process is pushed forward by setting the new constraint results to be the upper bound of the next iteration. This iterative process guarantees the optimality of the output annotated program.

Loop splitting is performed before partitioning to divide a loop into several subloops which can reside in separate cores.

### Layout

The layout process maps partition numbers to physical cores. This step is modeled as a Quadratic Assignment Problem (QAP). There are a set of F facilities and a set of L locations. A flow function is specified representing the number of messages transmitted between each pair of facilities, and a distance function is specified as Manhattan distance for each pair of locations. The problem is to find a mapping solution from facilities to locations with the goal of minimizing the sum of the distances multiplied by the corresponding flows. The cost function is in quadratic form, hence the name of the problem. The authors found that Simulated Annealing (SA) generated the best solutions in the most efficient way, so this subproblem is solved by a SA implementation.

### Code Separation

In this step, the program is separated into multiple fragments on physical cores. In particular, read and write operations are inserted into the code, during which the original order of operations is preserved to avoid deadlock. For basic statements, the code for each partition is generated by traversing the AST in post-order and placing sub-expressions according to the partition types. For functions, a function call in the original program corresponds to calling the function at all partitions it resides. For arrays, one array can be partitioned into multiple cores and perform computations in parallel.

### Code generation

The code generation procedure takes in a single-core program and generates machine code. A typical way to generate machine code is by using a bottom-up approach that performs local optimizations and gradually builds up the whole sequence. This method applies well to regular architectures where the designers can determine all the valid ways to generated code. While on unusual hardware structure, it is unclear whether local optimizations can be sufficient to leverage some special hardware structures such as circular buffers.

The authors applied superoptimization to search for the optimal code sequence. However, superoptimizers only scale to small programs, and it is non-trivial to apply superoptimization to real problems.

One challenge is that a straightforward set of specifications can prevent some hardware-specific optimizations. Take the use of data stack as an example, a simple way we consider two sequences of instructions $P$ and $P’$ to be equivalent is that the live regions $L$ and $L’$ after executing $P$ and $P’$ respectively contain the same elements and the stack pointers are pointing at the same locations. This strict specification results in longer programs with additional instructions dedicated to removing older operands at the bottom of the circular stack, which is actually non-hazardous. The authors tailored the specifications for modular superoptimization to maximize the benefits of spatial architecture.

The other challenge is that when breaking down the large program into smaller pieces, the selection of the boundary can be tricky. The authors applied superoptimization on a sliding window of superoptimization units and consecutively find valid superoptimized segments. Although dynamic programming is able to produce a better result, the sliding window technique turns out to be more efficient.

The authors used Z3 SMT solver to perform the search. The state of a program and communication channels are encoded as a large bitvector that is fed in Z3. The address space is compressed to speed up the searching process.

## Limitations

There are some occasions when the proposed solution misses some optimization opportunities or fails to produce partitions that are small enough to fit in cores. Since both partitioning and routing stages are schedule-oblivious, the output can introduce performance loss. Moreover, some context-related optimizations can be missing as the scope of superoptimization is still local to individual segments. To deal with the oversized partitions generated from the partitioning synthesizer, the compiler employs an iterative refinement method which increases the estimate margin in each rerun after the output fails to fit in cores.

## Evaluation

This paper organizes the experiments in a clear and concise manner. The benefits brought by the proposed framework are presented as several hypotheses, and experiments are designed to prove their validity.

The first and foremost hypothesis is that the proposed partitioning synthesizer, layout synthesizer, superoptimizer and sliding windows technique indeed provide performance gain. The authors conducted experiments to compare against heuristic partitioner (hp), imprecise layout synthesizer (il), no superoptimizer (ns), and fixed-windows superoptimization (fixed s). The above figure shows the results, from which we can see the benefits breakdown for each technique.

Another advantage is that the partitioning synthesizer produces smaller programs that occupy fewer cores, compared with the heuristic algorithm. One drawback of a heuristic partitioner is it relies on manual parameter tuning to ensure that each program fragment fits within the space limit per core. The space estimation margin factor $k$ is an example of such parameters, varying with different applications. Hence, the synthesizer is more robust than the heuristic.

The superoptimizer can discover clever optimizations that traditional compilers may not, including logic simplification, strength reduction, and automatic CSE. The authors selected three bit logic computations as benchmarks and found that superoptimization provides 1.8x speedup and 2.6x code length reduction on average. This observation corresponds to the motivation of leveraging synthesis-aided compilers for unusual and evolving architectures. Traditional rewrite-based compilers only perform a limited number of optimizations, for which it is hard for them to catch up with emerging new hardware features.

The authors also evaluate results against expert-written programs on several single-core applications and one multi-core MD5 hash application. Compared to the experts’ implementation, the programs generated by Chlorophyll is 65% slower, 70% less energy-efficient and uses 2.2x more cores, which argues to be comparable. With the help of Chlorophyll, programmers can easily explore different implementations and get out a design with good performance in a short period of time. The compiler can also be improved by providing more human insights. For example, adding more highly optimized templates improves the performance of generated programs and scalability of the synthesizers.

## Questions

1. What are the unique advantages of synthesis-aided compilers over traditional compilers?
2. Why did the authors tear apart the compilation problem into four subproblems?
3. Why did the authors use superoptimization instead of dynamic programming when doing code generation? What benefits can be foreseen when choosing the algorithms?
4. The paper mentioned some limitations in their methodology. What additional techniques do you think can help improve the results?


text:
# Lesson 1Something to Talk AboutDevelop Understanding

Rewrite the following expressions by applying the distributive property.

## Set

### 8.

Create standard mathematical representations (table, graph, equations) that relate the figure number to the number of squares for the sequence of figures. Find the number of squares for Figure 4.

Figure Number

Number of Squares

Equations:

### 9.

How does the rate of change for the relationship in problem 8 show up in the table? Explain.

### 10.

How do the terms in the equations connect with the diagrams provided?

## Go

Identify the rate of change in each of these contexts or representations of linear functions.

Slope of

### 17.

George is loading freight into an elevator. He notices that the weight limit for the elevator is . He knows that he weighs . He has loaded boxes into the elevator. Each box weighs . Identify the rate of change for this situation.

### 18.

 Independent Variable Dependent Variable $4$ $5$ $6$ $7$ $8$ $5$ $5.5$ $6$ $6.5$ $7$

and


text:
# How to apply the fundamental theorem to partial derivatives?

1. Jul 21, 2016

### Eclair_de_XII

1. The problem statement, all variables and given/known data
"Under mild continuity restrictions, it is true that if $F(x)=\int_a^b g(t,x)dt$,

then $F'(x)=\int_a^b g_x(t,x)dt$.

Using this fact and the Chain Rule, we can find the derivative of

$F(x)=\int_{a}^{f(x)} g(t,x)dt$

by letting

$G(u,x)=\int_a^u g(t,x)dt$,

where $u=f(x)$."

Given:

$F(x)=\int_{0}^{x^2} \sqrt{t^4+x^3}dt$,

find $\frac{dF}{dx}$.

2. Relevant equations
$\frac{dF}{dx}=\frac{dF}{dt}\frac{dt}{dx}+\frac{dF}{du}\frac{du}{dx}$

3. The attempt at a solution
$\frac{dF}{du}=\frac{d}{du} \int_{0}^{x^2}\sqrt{t^4+x^3}dt=\sqrt{(x^2)^4+x^3}=\sqrt{x^8+x^3}$
$\frac{du}{dx}=\frac{d}{dx}(x^2)=2x$ by letting $u=x^2$

$\frac{dF}{dt}=F'(t)=\int_{0}^{x^2} g_x(t^4+x^3)dt=\int_{0}^{x^2} \frac{3x^2}{2\sqrt{t^4+x^3}}$

I know that: $\frac{dF}{dx}=2x\sqrt{x^8+x^3}+\int_{0}^{x^2} \frac{3x^2}{2\sqrt{t^4+x^3}}\frac{dt}{dx}$

But, I'm at a loss at how to calculate: $\frac{dt}{dx}$, because I don't know how to define $t$, so I don't know how to differentiate it with respect to $x$.

2. Jul 22, 2016

### Delta²

in short the way you doing it is t=x but you cant replace that inside the integral. In short the result is
$$2x\sqrt{x^8+x^3}+\int_{0}^{x^2}\frac{3x^2}{2\sqrt{t^4+x3}}dt$$.

However in order to be more accurate, we have to define $F(x)=G(u(x),x)$ with $G(u,v)=\int_0^{u}\sqrt{t^4+v^3}dt$ therefore

$$\frac{dF}{dx}=\frac{\partial G}{\partial v}\frac{\partial v}{\partial x}+\frac{\partial G}{\partial u}\frac{\partial u}{\partial x}$$.

with $u(x)=x^2$ $v(x)=x$.

Calculating the above expression you ll get the result.

3. Jul 22, 2016

### Eclair_de_XII

So $\frac{∂G}{∂v}\frac{∂v}{dx}$ corresponds to $\int_{0}^{x^2} \frac{3x^2}{2\sqrt{t^4+x^3}}$ and $\frac{∂G}{∂u}\frac{∂u}{∂x}$ corresponds to $2x\sqrt{x^8+x^3}$? And $v'(x)=1$, so it's just $\int_{0}^{x^2} \frac{3x^2}{2\sqrt{t^4+x^3}}+2x\sqrt{x^8+x^3}$. I guess that makes sense; I mean, I just need to perform the proper substitutions and such. Anyway, thank you for your help, Delta.


text:
# Tikzposter - opacity of the blocks

I am trying to make the blocks in tikzposter class less opaque. I can't find a direct way to do it other than changing the cls, which seem fairly complicated. Any ideas?

\documentclass[11pt,a0paper]{tikzposter}
\begin{document}
\begin{columns}

\column{0.5}
\block{A test!}{ %% Normal block
asddd
}

\column{0.5}
%% how do I change the background opacity of the block here?
%% I assume i need to do a renewcommand on \block, but that seems
\block[opacity = 0.5]{A test!}{
asd
}

\end{columns}
\end{document}

• It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. – Peter Grill Oct 21 '16 at 4:39
• added a small example, though don't think its of any use – xcorat Oct 21 '16 at 4:47

Ok, created a new block style with opacity parameter.

Simple rudimentary example:

\documentclass[11pt,a0paper]{tikzposter}

\defineblockstyle{Default1}{
titlewidthscale=1, bodywidthscale=1, titlecenter,
titleoffsetx=0pt, titleoffsety=0pt, bodyoffsetx=0pt, bodyoffsety=0pt,
bodyverticalshift=0pt, roundedcorners=30, linewidth=0.4cm,
titleinnersep=1cm, bodyinnersep=1cm
}{
\begin{scope}[line width=\blocklinewidth, rounded corners=\blockroundedcorners]
\ifBlockHasTitle %
\draw[color=blocktitlebgcolor, fill=blocktitlebgcolor] (blocktitle.south west) rectangle (blocktitle.north east);
\draw[color=blocktitlebgcolor, fill=blockbodybgcolor, opacity=0.5] (blockbody.south west) rectangle (blockbody.north east);
\else
\draw[color=blocktitlebgcolor, fill=blockbodybgcolor, opacity=0.5] (blockbody.south west) rectangle (blockbody.north east);
\fi
\end{scope}
}
\useblockstyle{Default1}

\begin{document}
\node[above right,opacity=0.5,inner sep=0pt,outer sep=0pt] at (bottomleft) {\includegraphics[width=\paperwidth,height=\paperheight]{frog.jpg}};

\begin{columns}

\column{0.5}
\block{A test!}{
asddd
\input{sensitivity}
}

\column{0.5}
\block{A test!}{
asd
}

\end{columns}

\end{document}


text:
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I forgot where I originally found the code to do this, but I recently had to dig it out again to remind myself how to draw two different y axes on the same plot to show the values of two different features of the data. This is somewhat distinct from the typical use case of aesthetic mappings in ggplot2 where I want to have different lines/points/colors/etc. for the same feature across multiple subsets of data.
For example, I was recently poking around with some data examining enrichment of a particular set of genes using a hypergeometric test as I was fiddling around with other parameters that included more genes in the selection (i.e., in the classic example, the number of balls drawn from some hypothetical urn). I wanted to show the -log10(p-value) on one axis and some other value (e.g., “n”) on the same plot, using a different axis on the right side of the plot.
Here’s how to do it. First, generate some data:
set.seed(2015-04-13)

d = data.frame(x =seq(1,10),
n = c(0,0,1,2,3,4,4,5,6,6),
logp = signif(-log10(runif(10)), 2))

xnlogp
101.400
200.590
311.200
421.500
530.028
640.380
742.500
850.067
960.041
1060.360
The strategy here is to first draw one of the plots, then draw another plot on top of the first one, and manually add in an axis. So let’s draw the first plot, but leave some room on the right hand side to draw an axis later on. I’m drawing a red line plot showing the p-value as it changes over values of x.
par(mar = c(5,5,2,5))
with(d, plot(x, logp, type="l", col="red3",
ylab=expression(-log[10](italic(p))),
ylim=c(0,3)))

Now, draw the second plot on top of the first using the par(new=T) call. Draw the plot, but don’t include an axis yet. Put the axis on the right side (axis(...)), and add text to the margin (mtext...). Finally, add a legend.
par(new = T)
with(d, plot(x, n, pch=16, axes=F, xlab=NA, ylab=NA, cex=1.2))
axis(side = 4)
mtext(side = 4, line = 3, 'Number genes selected')
legend("topleft",
legend=c(expression(-log[10](italic(p))), "N genes"),
lty=c(1,0), pch=c(NA, 16), col=c("red3", "black"))