Marc Tchiboukdjian
email: marc.tchiboukdjian@imag.fr

Vincent Danjean
email: vincent.danjean@imag.fr

Bruno Raffin
email: bruno.raffin@imag.fr

A Fast Cache Oblivious Mesh Layout with Theoretical Guarantees

Keywords: Visualization of large data sets, Cache-aware, Cache-oblivious, Mesh layouts, Heterogeneous platforms

One important bottleneck when visualizing large data sets is the data transfer between processor and memory.

Cache-aware (CA) and cacheoblivious (CO) algorithms take into consideration the memory hierarchy to design cache efficient algorithms.

CO approaches have the advantage to adapt to unknown and varying memory hierarchies. Recent CA and CO algorithms developed for 3D mesh layouts significantly improve performance of previous approaches. However, these algorithms are based on heuristics. We propose in this paper a new CO algorithm for meshes that has both a low theoretical complexity and proven quality. We guarantee that a coherent traversal of an O(N )-size mesh in dimension d will induce less than O(N/B + N/M 1/d ) cache misses where B and M are the block size and the cache size. We compare our layout with previous ones on several 3D meshes.

Introduction

As the size of data generated by massively parallel simulations reaches terabyte scale, interactive scientific visualization, even on clusters, becomes challenging. One important bottleneck when visualizing large data sets is the data transfer between processor and memory. This issue tends to worsen Cache-aware (CA) and cache-oblivious (CO) algorithms take into consideration the memory hierarchy to design cache efficient algorithms. CA algorithms are based on the external-memory (EM) model [START_REF] Aggarwal | The input/output complexity of sorting and related problems[END_REF]. The memory hierarchy consists of two levels, a main memory of size M called cache and an infinite size secondary memory called disk. Data is transferred between these two levels in blocks of B consecutive elements. The I/O complexity of an algorithm is Q the number of blocks transfers. The CO memory model [START_REF] Frigo | Cache-oblivious algorithms[END_REF] is essentially the EM model where cache and block sizes are unknown (Fig 1). CO approaches have the advantage to adapt to unknown and varying memory hierarchies. This is well adapted to data visualization applications that must face complex memory hierarchies: simulation and rendering usually take place on different machines with different memory hierarchies, and platforms can be heterogeneous, mixing multi-core CPUs and GPUs. In this field the most significant and recent work is probably the CO mesh layout proposed by Yoon et Al. [START_REF] Yoon | Cache-oblivious mesh layouts[END_REF]. Performance is not theoretically guaranteed, but experiments show a significant performance improvement compared to other approaches.

As memory is accessed by blocks on modern com-Figure 2: Good layouts can significantly reduce the number of block transfers. On the left hand side, 75% of the data must be loaded to access the query slice (each line corresponds to a cache line), while the layout used on the right hand side enables to reduce this amount to only 33% of the data (each block fits into a cache line).

puters, elements accessed sequentially during computations should be stored nearby in memory to increase cache performance (Fig. 2). In this article we propose a CO data layout for meshes that is cache efficient for access patterns showing a good spatial locality. An assumption on the access pattern is mandatory to build an efficient layout: no layout can provide a performance gain for a random access pattern.

Given a mesh, we model the access pattern as a graph where each node represents a data (a vertex, a triangle or a tetrahedron for instance) and each edge connects data that are likely to be accessed sequentially. The goal is to compute a mesh layout, i.e. a permutation of the mesh data, that minimizes the number of cache misses in the CO model when we access all the mesh respecting the spatial locality defined by the graph.

In the general case where there is no restriction on the graph, the problem is very likely to be NPcomplete. Even deciding if we can have a layout with less than N/B cache misses is NP-complete (it is the bandwidth reduction problem).

In this article, we propose an algorithm to compute a CO mesh layout with a proven quality. We prove that a coherent traversal of a O(N )-size mesh in dimension d leads to less than O(N/B+N/M 1/d ) cache misses in the CO model whatever B, the block size, and M , the cache size, are. The cost of running this algorithm on a mesh is also reduced (O(N log N )) and the amount of memory al-located is about the memory size required to store the mesh.

We tested the algorithm with several 3D meshes. We visualize the mesh using VTK. Once the mesh layout is computed, it is stored as a VTK unstructured mesh. No modification of the VTK visualization pipe-line is required. We compare the performance results with the one obtained using the original layout and using the layout computed from the CO algorithm, named OpenCCL, developed by Yoon et Al. [START_REF] Yoon | Cache-oblivious mesh layouts[END_REF]. Both CO layouts significantly outperform the original layout for unstructured meshes. The two CO layouts show similar performance when visualizing the data, except that our algorithm computes the layout significantly faster and with less memory.

Related works are discussed in section 2. The algorithm is presented and analyzed in section 3, before to introduce experimental results in section 4.

Related Work

Cache efficient algorithms and layout for structured meshes. There is a large body of work on CA and CO algorithms for regular data structures, see for example the surveys [START_REF] Vitter | External memory algorithms and data structures: dealing with massive data[END_REF] and [START_REF] Arge | Cache oblivious data structures[END_REF]. For a focus on scientific visualization and computer graphics see [START_REF] Silva | Out-of-core algorithms for scientific visualization and computer graphics[END_REF]. The area where we can observe the biggest improvement over standard (non cache efficient) counterpart is dense linear algebra. The basic technique used by BLAS libraries (e.g. for dense matrix multiplication) is blocking [START_REF] Whaley | Minimizing development and maintenance costs in supporting persistently optimized BLAS[END_REF]. A CO alternative to blocking (where cache sizes are needed) is space filling curves [START_REF] Bader | Cache oblivious matrix multiplication using an element ordering based on a peano curve[END_REF]. Layout for regular meshes uses similar techniques as dense linear algebra: blocking and space filling curves [START_REF] Niedermeier | Towards optimal locality in mesh-indexings[END_REF].

Layout for unstructured meshes. The first work in the area of unstructured meshes is [START_REF] Hoppe | Optimization of mesh locality for transparent vertex caching[END_REF] which assumes a FIFO cache and known cache parameters. [START_REF] Bogomjakov | Universal rendering sequences for transparent vertex caching of progressive meshes[END_REF] extends this work, still requiring a FIFO cache but without knowing the cache parameters. [START_REF] Lin | An improved vertex caching scheme for 3d mesh rendering[END_REF][START_REF] Sander | Fast triangle reordering for vertex locality and reduced overdraw[END_REF] give fast greedy algorithms but requires the cache parameters and policy. [START_REF] Yoon | Cache-oblivious mesh layouts[END_REF][START_REF] Yoon | Mesh layouts for block-based caches[END_REF] do not assume any particular cache policy and developed both CA and CO approaches. The 3D mesh layout algorithms of [START_REF] Yoon | Cache-oblivious mesh layouts[END_REF][START_REF] Yoon | Mesh layouts for block-based caches[END_REF] significantly improve performance of previous approaches. However, these algorithms are based on heuristics that do not guarantee any bound on the time needed to generate the layout nor on the quality obtained (number of cache misses and processing time for rendering). They are both based on a multi-level optimization scheme which gives relatively slow algorithms.

Cache Oblivious Layout

Our goal is to compute a layout for meshes that shows a good behavior in the CO memory model. The access pattern on the mesh data is modeled by a graph where each vertex represents a data and each edge connects data that are likely to be accessed sequentially. Our algorithm require the graph to be an overlap graph, which is define in the following. It included most of spatially coherent access patterns on meshes. For instance an important example of overlap graphs is the graph whose vertices are mesh nodes and edges connect vertices sharing a face in the mesh.

Starting from the graph of sequential accesses, we compute the CO layout by recursively splitting the graph in 2 parts. The layout is obtained by storing sequentially the leaves resulting from the recursive graph splitting. The intuitive idea is that each recursive level corresponds to a block size. The initial level correspond to a block size able to store the full graph. The second level corresponds to a block size able to store half the graph, etc. Thus, at visualization time, there will always be a level that will correspond to the actual block sizes of the machine.

The separator algorithm we use was developed by [START_REF] Miller | Geometric separators for finiteelement meshes[END_REF]. It splits the graph in 2 parts of about the same size while attempting to minimize the number of edges cut. We will later see that the number of edges cut is closely related to the number of cache misses induced by a mesh traversal. Notice that we are not limited to 3D meshes. It can apply to any d-dimensional mesh.

Overlap graphs

Overlap graphs is the class of graphs embedded in a fixed dimension that have a small separator, which is a relatively small subset of edges whose removal divides the rest of the graph into two disconnected pieces of approximately equal size. By taking advantage of the geometric structure, partitioning can be performed efficiently. Computational meshes are often composed of elements that are well-shaped in some sense, such as having bounded aspect ratio or having angles that are not too small or too large. Overlap graphs model this kind of geometric constraint.

An overlap graph starts with a neighborhood system, which is a set of closed balls in R d that restrains how they can intersect.

Definition 1 (Neighborhood system [START_REF] Miller | Geometric separators for finiteelement meshes[END_REF])

A neighborhood system in d dimensions is a set B 1 , . . . , B n of closed balls in R d , such that no point in R d is
strictly interior to more than one ball.

A neighborhood system and the parameter α define an overlap graph where there is one vertex per ball. An edge joins two vertices if expanding the smaller of their two balls by a factor of α would make them intersect.

Definition 2 (Overlap graph [START_REF] Miller | Geometric separators for finiteelement meshes[END_REF]) Let α ≥ 1 and let B 1 , . . . , B n be a neighborhood system. The α-overlap graph for the neighborhood system is the graph with vertex set {1, . . . , n} and edge set

{(i, j) | B i ∩ (α.B j ) = ∅ and B j ∩ (α.B i ) = ∅}.
Overlap graphs are good models of computational meshes because every mesh of bounded aspect-ratio elements in two or three dimensions is contained in some overlap graph (for a good choice of the parameter α) [START_REF] Miller | Geometric separators for finiteelement meshes[END_REF].

The separator algorithm we detail in next section is based on the following theorem: Theorem 3 (Geometric separator [START_REF] Miller | Geometric separators for finiteelement meshes[END_REF]) Let G be an n-vertex α-overlap graph in d dimensions.

Then the vertices of G can be partitioned into two sets A and B such that |A|, |B| ≤ d+1 d+2 n and the number of edges between A and B is O αn 1-1/d . Such a separator can be computed with high probability by a randomized linear time algorithm. Such a separator is optimal for this class of graphs. Indeed we cannot find a smaller separator for a regular d dimensional grid.

Geometric separator algorithm

The geometric separator algorithm (Algo. 1) from [START_REF] Miller | Geometric separators for finiteelement meshes[END_REF] starts by randomly sampling a constant number of points from the input mesh and project them onto the surface of the unit sphere in R d+1 . Then it finds a centerpoint of this random sample in linear time relative to the sample size. A point is a centerpoint if every hyperplane passing through it divides the sample set approximately evenly, at most in the ratio d + 1 : 1. With good probability, this centerpoint is a centerpoint of the original set of points [START_REF] Clarkson | Approximating center points with iterated radon points[END_REF]. Finally we randomly choose a hyperplane through the centerpoint and expect that it will not cut too many edges and will be a good separator. The quality evaluation could be improved using a random sample on the edges or a special data structure to store the edges taking into account some geometrical characteristics of the data.

Layout algorithm

The layout algorithm (Algo. 2) is the recursive application of the separator algorithm. It leads to a complete partition tree. The m-partition tree T of a graph G is a binary tree with G at the root and the children of a node H are the subgraphs H 0 and H 1 obtained by separating H using the separator algorithm. We apply this recursive scheme until each leaf contains less than m nodes. A complete partition tree is a partition tree with 1-node leaves.

Its complexity directly derives from the recursive calls of the separator algorithm.

Theorem 5 (Layout computation) The number of computational steps of the layout algorithm is

W (n) = O (n log n).
Proof. The separator algorithm 1 has linear complexity. Splitting a subgraph decreases the size of its children by at least a factor d+1 d+2 . Thus the complete partition tree has depth O(log n) and the overall complexity is O (n log n).

Different data structures can be used to store the data when computing the layout. The only requirement to obtain the claimed complexity is to have a node sampler of linear complexity and an iterator on edges of linear complexity too. The approach we adopt in this paper uses two arrays: one for the vertex coordinates and one for unordered edges (pair of vertex indices). We partition the nodes and the edges according to the computed separator. Nodes at the left of the separator are moved at the left of the array and nodes at the right of the separator are moved to the right of the array. For edges we use a 3-way quicksort approach. Inner edges of H 0 are stored at the left, inner edges of H 1 at the right and cut edges between H 0 and H 1 in the middle.

Layout quality

Before analyzing the number of block transfers related to our layout, we define the cut, inner and outer edges of a partition tree (Fig. 3). We then compute an upper bound for the number of outer edges. These edges are related to the cache misses induced by a graph traversal.

Lemma 8 (Number of outer edges) Let T a m-partition tree of an n-node graph. Then the total number of outer edges is O n m 1/d . Proof. The number of outer edges in T is equal to the sum of all cut edges for all non-leaf subgraphs of T . Let K(r) be the maximum number of cut edges in a subtree T ′ of T rooted at a subgraph of size r. If r ≤ m then T ′ is just a leaf and K(r) = 0. If r ≥ m we count the cut edges of the left and right children and the cut edges of the root of T ′ :

K(r) ≤ max 1/2≤λ≤δ [K(λr) + K((1 -λ)r)] + cr 1-1/d
By induction, we can prove that

K(r) ≤ c ′ r m 1/d -r 1-1/d as long as c ′ ≥ c 2 1/d -1
Moreover the number of outer edges is less than K(n). Thus we obtain the claimed bound.

We now can compute the number of block transfers.

Theorem 9 (Layout quality) The cacheoblivious layout of section 3.3 guarantees that a traversal of the graph induces less than O(n/B + n/M 1/d ) block transfers.

Proof.

Let T the complete partition tree of G computed in algorithm 2. Let T ′ ⊂ T the M -partition tree of G and H 1 , . . . , H k its leaves. H 1 , . . . , H k is a partition of G that is stored sequentially in memory. A traversal of G is a traversal of each of the H i . As the size |H i | of one H i is less than M , we can store it completely in cache for a cost of O(|H i |/B) and a traversal of the inner edges of H i does not cause any additional block transfer. Only outer edges cause additional block transfers of 1 per edge. From lemma 8, the number of outer edges of T ′ is O(n/M 1/d ). Thus the total number of block transfers needed to traverse all the graph is

k i O |H i | B + O n M 1/d . As k i |H i | = n, we get Q(n) = O n B + n M 1/d
which complete the proof.

At this point we cannot directly compare this algorithm with OpenCCL. OpenCCL is based on a meta-heuristic and no upper bound on the quality of the resulting layout is given nor a βapproximation.

Experiments

In this section we detail experiments run with 3 different 3D meshes: a structured mesh, an AMR mesh and an unstructured one (Table 1). For each of these meshes we compare the performance results of the original layout (as provided), the layout computed by the OpenCCL algorithm of Yoon et Al. [START_REF] Yoon | Cache-oblivious mesh layouts[END_REF], and our layout.

Experiments ran on 8 processor PC equiped with opteron 875 dual-core processors running at 2,2Ghz. Only one core was used. Each core as its own L1 and L2 caches: a 2-way associative L1 cache of 64K and a 16-way associative L2 cache of 1024K, both caches using lines of 64 bytes. We first focus on the computation of the layout and compare our algorithm with OpenCCL. Our algorithm was developed in C++ following the Matlab implementation of [START_REF] Gilbert | Geometric mesh partitioning: implementation and experiments[END_REF]. Its parameters were set to n c = 2 and n h = 50 to compute 5-partition trees (graph of less than 5 nodes are not further split). The OpenCCL algorithm was used as provided at [START_REF]OpenCCL: Cache-Coherent Layouts[END_REF]. For the 3 meshes tested our algorithm significantly outperform OpenCCL regarding the computation time and the memory used (Table 2).

Once the layouts computed, we compare the resulting performance when the meshes are read for a visualization. We use VTK 5.0.4 and measure the execution time when moving a cut plan in diagonal on the mesh from bottom left to top right. Each experiment is repeated 30 times. In all cases OpenCCL and our algorithm show very similar performance (Table 3). For the structured and AMR meshes, the CO layouts do not provide a performance improvement over the original layout. Two reasons explain this result:

• Being structured meshes, the original layouts already have a cache efficient data structure;

• Both meshes are small, making it difficult to measure any cache improvement that the CO layouts could provide.

In opposite, the CO layouts both significantly outperform the original layout for the Skull unstructured mesh. These results are confirmed when counting the number of L1 cache misses using the Cachegrind utility (Table 4). We also compute the density of edges according to their length for each Skull layout (Fig. 5). The edge length is computed from the layout. The length of an edge is the number of nodes separating the storage location of each extremity. Large edges tend to produce more cache misses that small ones as the cache lines storing both extremities are more likely to store data required before being evicted. The edge length distribution for the original layout shows various peaks while CO layouts tend to have a smoother distribution with high density of small edges. This edge length distribution is coherent with the experienced execution times and number of cache misses.

We further investigate the effect of the cache size on the Skull mesh using Cachegrind (Fig. 4). The smaller the cache size is, the more efficient CO layouts are compared to the original layout. It confirms what we observed about edge lengths: favoring small edge lengths leads to more robust layouts.

Conclusion

Memory transfers are one of the main bottleneck for the visualization of large meshes. This bottleneck tends to worsen with new multi-core architectures showing complex memory hierarchies. In this context, it is important to control the mesh memory layout in an attempt to reduce the number of useless data transfers. In this paper we presented an algorithm to compute cache oblivious mesh layouts. Cache oblivious layouts have the advantage not to depend on a given block and cache size. The layout does not have to be recomputed when changing of machine or if the cache size available dynamically changes during execution for instance.

Experiments shows that our layout performance match the layouts computed from Yoon et Al. [START_REF] Yoon | Cache-oblivious mesh layouts[END_REF] OpenCCL algorithm. But in opposite to this algorithm, our algorithm performance is theoretically guaranteed on the number of block transfers. It also significantly outperform OpenCCL regarding execution time and memory allocation when computing the layout, an important criteria as we focus on large meshes. Future work will focus on validating our algorithm on very large meshes and a more important variety of access patterns. We are also investigating the benefits of this algorithm on GPUs and in the context of parallel mesh visualization.

Figure 1 :

 1 Figure 1: The cache-oblivious memory model

Algorithm 1 : 2 P 5 move c at the origin repeat n h times 6 n ← random normal vector 7 φ 8 compute the number of edges cut by φ 9 end 10 end 11 return the best φ 12 The

 1256789101112 Geometric separator algorithm Input: Mesh M = (Nodes N, Edges E) Output: A separator φ repeat n c times 1 N s ← sample of (d + 3) 4 points of N ← project N s to the unit sphere in R d+1 3 c ← centerpoint of P 4 (u, r) ← rotation and scaling factor to ← separator defined by (u, r, n) execution time is dominated by the quality evaluation of the separator (Algo. 1 line 8). Both the time complexity and the I/O complexity of this quality evaluation are linear in the number of edges. This is the non coherent accesses of the nodes through the edges that induce the high I/O complexity. The remaining steps of the algorithm only lead to a time complexity linear in n c and s the sample size and very small I/O complexity (Q(s) = O(n c s/B)).

Algorithm 2 : 1 π 2 return π 3 Definition 4 (

 21234 Layout algorithmInput: Graph G Output: Permutation of the nodes π T ← complete partition tree of the graph G ← left to right order of the leaves of T Partition tree)

Figure 3 :

 3 Figure 3: Cut edges of T and outer edges of H 2 .

Figure 5 :

 5 Figure 5: Density of edges depending on their size for the different Skull mesh layouts.

Figure 4 :

 4 Figure 4: Number of cache misses for the Skull mesh with L1 cache size varying from 8KB to 128KB. Cachegrind was used to simulate the various cache sizes.

Table 1 :

 1 Characteristics of the 3 meshes tested.

	Mesh	Points	Cells		Mesh type
	Plasma		274k	1,310k tetra	structured
	Reactor		84k	78k hexa		AMR
	Skull		37k	156k tetra	unstructured
			Our layout		OpenCCL
	Mesh		time mem	time mem
	Plasma	107.4	124	282.4 6843
	Reactor	8.8	15	27.6	458
	Skull		10.6	16	26.9	814

Table 2 :

 2 Time (in seconds) and maximal memory (in MB) for the layout computation.

Table 3

 3

	: Average execution time and standard de-
	viation (in parenthesis) when visualizing the differ-
	ent meshes: a cut plane is moved through the whole
	mesh.
	Mesh	Original OpenCCL Our Layout
	Plasma	146.6	150.7	151.2
	Reactor	21.5	21.8	22.0
	Skull	26.5	21.7	21.8

Table 4 :

 4 Number of L1 cache misses (in millions)when visualizing the different meshes.

Acknowledgements

This work is partly funded by CEA/DIF/DSSI, Bruyères le Châtel, France and by the Agence Nationale de la Recherche contract ANR-07-CIS7-003.

Plasma 1 and Skull 2 models are provided by the AIM@SHAPE Shape Repository 3 .


Fang Yin

Barbara Lonetti

Jean-Daniel Marty
email: jean-daniel.marty@univ-tlse3.fr

Nancy Lauth-De Viguerie
email: nancy.de-viguerie@univ-tlse3.fr

CO2-switchable thermoresponsiveness of poly(N,N-(diethylamino)ethyl acrylamide)-based homo-and copolymers in water

Keywords: CO2-responsive block copolymers, pH and thermo-responsive block copolymers, RAFT, PNIPAM, tertiary amine moieties

The insertion of CO2 switchable N,N-(diethylamino)ethyl acrylamide monomer enable to tune easily and reversibly the properties of PNIPAM-based polymers.

Introduction

Carbon dioxide (CO2) has emerged as an innovative and green trigger for switching the properties (such as solubility, dimension, chain conformation, morphology, shape...) of responsive polymer materials in aqueous media. [1][2][3][4][5] As a key metabolite in living organisms, CO2 displays excellent biocompatibility and membrane permeability; as an industrial production waste, it is abundant, inexpensive, available and nontoxic. Moreover, in aqueous solution, CO2 combines with water to form carbonic acid, which lowers the solution pH. The added CO2 can be easily removed by bubbling inert gases, e.g. nitrogen or argon, or by heating up the solution [6] causing the polymer return back to its original state. Therefore, CO2-reponsiveness is a special example of a pHresponsive trigger. Generally, in classical pH-responsive systems, an acid or a base solution is added to trigger the property change, which leads to the accumulation of salt in system. However, such salt build-up can be avoided by using CO2. [3,5,7] Thus, developing CO2-responsive polymer materials holds great promise for designing switchable vectors in drug delivery, [8,9] for limiting CO2 emission from industrial process [10][11] and for controllably separating oil/water mixture. [12,13] Commonly reported CO2-responsive polymer materials comprise amidine, [14,15] guanidine, [16] imidazole [17] and amine groups. [18][19][20] These functions in aqueous media can react with CO2 to generate charged species. However, the switching between neutral and charged forms upon CO2 addition/removal is not always fully reversible. [21] Thus, moderately basic tertiary amine-based polymers exhibit reversible behavior, whereas those with a strong or weak basicity cannot be easily recovered to neutral forms or are less sensitive to CO2 stimulation. Hence polymers with tertiary amines functional groups are readily switched to bicarbonate salt upon CO2 exposure and return to neutral form after exposure to inert gases. Some amine-based CO2-responsive homopolymers, mostly in their uncharged forms, display thermoresponsive behaviors. Among them, poly(N,N-(dimethylamino)ethyl methacrylate) (PDMAEMA) (pKa ~7.5) and poly(N,N-(diethylamino)ethyl methacrylate) (PDEAEMA) (pKa ~ 7.4) are the most studied CO2-responsive polymers since their corresponding monomers are commercially available. [22,23] PDMAEMA and PDEAEMA exhibit a lower critical solution temperature (LCST) within a specific pH window. The number of carbon atoms in alkyl substituent (methyl or ethyl) has a pronounced effect on the value of transition temperature: PDMAEMA is well soluble in water at room temperature whatever the pH value and presents a LCST behavior only at high pH values (above pKa). In contrast, PDEAEMA is soluble and thermoresponsive in its protonated form and is no longer soluble at high pH whatever the temperature. [24] Copolymers based on these two CO2-responsive polymers have thus been extensively studied for their ability to form different colloidal structures (nanospheres, gels, micelles, polymersomes…) and to induce reversible morphological transition upon CO2 exposure from a simple volume change to a sol-to-gel or micelle-to-vesicle transition. [20,[25][26][27] Poly(N-isopropylacrylamide) (PNIPAM) presents, like poly(N-vinylcaprolactam) [28,29] or poly(oligo(ethylene glycol) methyl ether (meth)acrylate)s, [30] a thermoresponsive character which is materialized by the presence of a LCST in its phase diagram. This results from a coil-to-globule transition due to the dehydration of polymer chains at temperature around 32 o C. [31][32][33] The incorporation of hydrophilic or hydrophobic comonomers into PNIPAM allows fine-tuning of the cloud point temperature (Tc). [34,35] Therefore, the objective here is to insert into PNIPAM structure CO2-responsive moieties, whose hydrophilicity can be modulated by addition/removal of CO2, which will make it possible to play on the thermosensitive properties of the considered polymers. Therefore, previous studies described the synthesis of PNIPAM-based CO2-responsive copolymers with diblock (PDEAEMA60-b-PNIPAM40) [36], triblock (PNIPAM-b-PCL-b-PDMAEMA with PCL corresponding to poly(ε-caprolactone)) [37] or more complex structures (PCL-b-P(NIPAM-co-DMAEMA) with a pyrene termination group). [38] With the objective to insert such CO2-sensitive groups in PNIPAM, the use of monomers based on acrylamide is of special interest compared to the poly(methacrylate) monomers: a higher hydrolytic stability during heating/cooling cycles at different pH values and a radical reactivity close to the one of PNIPAM. Scheme 1 illustrates CO2-responsive poly((meth)acrylamide) polymers reported in the literature. [42] PDMAPMAM: poly((N,N-dimethylamino)propyl methyl acrylamide), [43] PDMAPAM: poly((N,N-dimethylamino)propyl acrylamide), [44] PDEAEAM: poly((N,N-diethylamino)ethyl acrylamide). [45] Among them, PDEAEAM homopolymer which is thermo-and pH-/CO2-responsivis is of special interest. PDEAEAM is thermoresponsive in its unprotonated form and lose this property in its protonated form upon CO2 bubbling. Bubbling inert gases enable to recover partially its thermoresponsiveness depending on the final protonation degree of the tertiary amine: hence Tc value decrease from 50.2 to 33.1 o C when the pH increases from 8.5 to 11. [45]. However, literatures involving multi-stimuli responsiveness of PDEAEAM-based copolymers are relatively scarce.

Guan and co-workers designed a multi-stimuli responsive star polymer of tetraphenylethene-graftetra-poly(N,N-(diethylamino) ethyl) acrylamide), which displayed a good performance in longterm cell tracing. [46] Kim et al. employed P(DEAEAM-r-NIPAM) as responsive surfactant to modulate shape transition of poly(styrene)-b-poly(4-vinylpyridine) particles between football and lens over a subtle change of temperature and pH. [48] In this work, the objective is to evaluate how copolymer composition and architecture affect the thermoresponsive properties and the aggregation behavior of PDEAEAM-based copolymers (Scheme 2). A statistical copolymer P(NIPAM-stat-DEAEAM) and a series of block copolymers PNIPAM-b-PDEAEAM with variable compositions were synthesized by Reversible Addition-Fragmentation chain Transfer (RAFT) polymerization, their solubilities in water as well as the selfassembly behavior driven by temperature upon CO2 addition/removal were then explored. Scheme 2. Structure of PNIPAM and PDEAEAM homopolymers, as well as P(NIPAM-co-DEAEAM) copolymer.

Materials and methods

Reagents

N-isopropylacrylamide monomer (NIPAM, Sigma-Aldrich), 4-cyano-4-((dodecylsulfanylthiocarbonyl) sulfanyl) pentanoic acid (CDTPA, 97%, Sigma-Aldrich) were used as received. 2,2'-Azobis(isobutyronitrile) (AIBN) was recrystallized twice from methanol. N,N-(diethylamino)ethyl acrylamide (DEAEAM) was synthesized as described elsewhere [43]. 1,4-Dioxane was purified by passing through alumina column prior to use. All other reagents were used as received unless otherwise specified.

Ultrapure water with a resistivity of 18.2 MΩ•cm was obtained using a Purelab Flex 1 apparatus.

Characterization

Nuclear Magnetic Resonance Spectroscopy (NMR). 1 H NMR spectra were recorded on Bruker

Advance spectrometers (300 or 500 MHz) with D2O as the solvent and 1,3,5-trioxane was used as an internal standard. The theoretical molecular weights (Mn,theo) of synthesized (co)polymers were calculated by (eq. 1):

M n,theo = [M] 0 × M M × Conv. [CTA] 0 + M CTA (eq. 1)
Where

Turbidimetry measurements.

The transmittance of (co)polymer solution was recorded on a variable UV-visible spectrophotometer at 500 nm under continuous stirring with a heating rate of 1 o C•min -1 . The cloud point temperature (Tc) was obtained either by the inflection point (Tc,ip) on transmission curves or by the temperature (Tc,onset) at which the transmittance of solution begins to decrease.

Transmission electron microscopy (TEM).

TEM observations were performed on a MET hitachi HT7700 instrument at an accelerating voltage of 80 kV. Samples were prepared in a dry box with setting temperature of 25 or 60 o C. Copolymer solution, copper grids and pipette tips were preheated in the dry box for 20 min. A 6 µL drop of the copolymer solution was deposited onto the copper grid until the solvent was evaporated, then these samples were stained with 2 wt.% uranyl acetate solution preheated at the sample temperature. After 2 min, the excess solution was removed by filter paper and samples were dried again. Note: to prepare samples in the presence of CO2 or N2, copolymer solution was bubbled with CO2 or N2 at room temperature with a flow rate of 10 min•L -1 for 10 min or 30 min, respectively, and sealed with rubber caps. Then samples at different temperatures were prepared with the similar procedures but a CO2 or N2 flow was employed during the drying process.

2.2.7. Small Angle X-rays scattering (SAXS) on 1 wt.% PN5k-b-PD5k solution was performed with a XEUSS 2.0 SAXS/WAXS laboratory beamline equipped with a Cu source (E = 8 keV). The 2D SAXS patterns were collected using a pixel detector PILATUS3 1 M from Detrics. The sample to detector distance was 1216.5 mm (beam size 0.8 × 0.8 mm), covering a q-range from 0.007 to 0.5 Å -1 . q is the scattering wave vector defined as q=(4/)sin/2,  is the wavelength (  1.54 Å) and  is scattering angle. The solutions were loaded in borosilicate capillaries of 1.5 mm diameter in thermostatic sample holders. The SAXS curves were measured at 25 and 60 °C.

The model used to describe the curves at 25 °C as star-like assemblies is the one developed for starpolymers formed of gaussian polymer arms: [49] 𝐼

(𝑞) = 2 𝑓𝜈 2 [𝜈 -1 + 𝑒 -𝑣 + 𝑓-1 2 (1 -𝑒 -𝑣 ) 2 ] (eq. 3) 𝑣 = 〈𝑅 𝑔 2 〉𝑞 2 𝑓 (3𝑓-2) (eq. 4)
with 〈𝑅 𝑔 2 〉 is the square of the ensemble average gyration radius of the full assembly and 𝑓 is the number of arms of the self-assembly.

The scattering curve of the sample at 60 °C upon CO2 treatment was described using the model of (eq. 5)

[50] formed by two terms, the first one describes the Porod scattering from clusters, while the second one is a Lorentzian function describing the scattering from polymer chains.

𝐼(𝑞) = 𝐴 𝑞 𝑚 + 𝐵 1+(𝜉𝑞) 𝑛
(eq. 5)

A and B are two scale constants, m is the Porod exponent from the scattering of clusters,  and n are the correlation length and power law exponent of polymer chains, respectively. Best fits of the form factor P(q)

for the measured data were derived using the SASView program (http://www.sasview.org/). was adjusted to 3 by addition of HCl solution (0.1 mol•L -1 ) to ensure full protonation of tertiary amine group. Then the solution was titrated with NaOH solution (0.1 mol•L -1 ). The value of pKa was determined by the inflection point on pH curve as a function of added volume of NaOH.

Synthesis

The desired PNIPAM and PDEAEAM homopolymers, and a series of PNIPAM-b-PDEAEAM block copolymers were synthesized by RAFT polymerization as previously described, [45][46] their corresponding synthetic procedures and characterizations were described in Supporting Information (scheme S1-S3 and Figures S1-S10).

Synthesis of poly((N-isopropylacrylamide

Gas aeration

A gas regulator was used to quantitatively control gas amount, CO2/N2 was introduced at room temperature by inserting a needle in (co)polymer solution with an appropriate flow rate at a given period of time.

Results and Discussion

Synthesis and characterization of (co)polymers.

PDEAEAM and PNIPAM reference homopolymers, as well as P(NIPAM-co-DEAEAM) copolymers with different architectures and compositions were synthesized by RAFT polymerization according to previously described synthetic pathways -using azobisisobutyronitrile (AIBN) as free-radical initiator and 4-cyano-4-((dodecylsulfanylthiocarbony) sulfanyl) pentanoic acid (CDTPA) as RAFT agent (Scheme 3). [45][46] These copolymers were designed with a targeted molecular weight of 10000 g•mol However, in the cases of PD homopolymers and PN-b-PD block copolymers the interaction between the nitrogen-containing polymer and SEC columns hampers the precise determination of molecular weights and induces the presence of a slight shoulder in DMF. [46] As a result, a clear shift of elution peak for block copolymers comprising a high content of PD compared to their macro-RAFT agent PN homopolymers is not always detected [51] whereas this phenomenon is considerably weakened in the case of P(N5k-stat-D5k). The main characteristics of synthesized polymers are summarized in Table 1.

CO2-switchable thermoresponsiveness of PD homopolymer.

PD homopolymer, a weak polyelectrolyte, is fully soluble in water whatever the pH at low temperature. The apparent pKa value of PD5k is 7.25 determined by pH-titration curve (Figure S11), and this value is close to the pKa values measured for PDEAEMA and PDMAEMA at 7.5 and 7.4 respectively. [22][23] CO2-responsiveness of PD5k homopolymer was confirmed by recording the pH value during successively bubbling CO2 and N2 processes (Figure 2). The degree of protonation was calculated by the following equation:

𝐷𝑒𝑔𝑟𝑒𝑒 𝑜𝑓 𝑝𝑟𝑜𝑡𝑜𝑛𝑎𝑡𝑖𝑜𝑛 = 1 1+10 𝑝𝐻-𝑝𝐾𝑎 (eq. 6)
The initial pH value of PD5k solution (1 wt.%) obtained by direct dissolution of polymer in ultrapure water is 9.3 corresponding to a degree of protonation equal to 0.92%. The addition of CO2 induces a rapid drop of pH down to 5.5 after 2.5 min with no longer further evolution, while the degree of protonation rises to around 99%. When N2 was bubbled for 20 min, the pH of PD5k solution gradually increases to 8.5, while the degree of protonation returns to 5%. Moreover, these variations in pH and/or degree of protonation upon alternately introduction of CO2/N2 is repeated for at least two cycles (Figure S12), it turns out that CO2-responsiveness is reversible, making CO2

superior to the classical pH-sensitive system in which an acid or base solution (e.g. HCl or NaOH) is added to tune the reversibility of the system. Consequently, salt (e.g. NaCl) is produced and accumulated after each cycle. To further assess the interaction between CO2 and PD5k homopolymer, we conducted 1 H and 13 C NMR spectra in D2O at 25 °C before and after bubbling CO2 and N2. As shown in Figure 3b, before exposure to CO2, PD5k homopolymer presents three prominent signals at 3.32, 2.64 and 1.07 ppm which are attributed to -CH2CH2N(CH2H3)2, -CH2CH2N(CH2CH3)2/-CH2CH2N(CH2CH3)2 and -CH3 groups, respectively. Upon 10 min bubbling CO2, PD5k is protonated, which shifts corresponding signals downfield to 3.56, 3.27 and 1.32 ppm, respectively. Meanwhile, the signal at 160 ppm in 13 C NMR spectrum after CO2 treatment reveals the formation of ammonium bicarbonate (see Figures 3a and3c). As expected in the case of tertiary amine, no formation of carbamate is evidenced here. [18,19,21] After 30 min bubbling N2, chemical shifts of these peaks return to 3.39, 2.80 and 1.14 ppm, respectively. This incomplete recovery to the initial position might be ascribed to the existence of residual bicarbonate salt corresponding to a residual protonation degree equal to 5% as mentioned above.

Coexistence of acrylamide and tertiary amine groups within PD5k structure endows the homopolymer with dual thermo-and pH-responsive properties. Thermoresponsiveness and the intensity of response are determined by the degree of protonation of diethylamino groups tuned by system pH. Considering CO2-induced protonation-deprotonation transition of diethylamino groups and its further effect on solubility of PD chains, turbidimetry measurements were therefore conducted to study the thermoresponsive properties of PD5k solution before and after bubbling CO2 or N2 (Figure 4a). Before exposure to CO2 (pH = 9.3), diethylamino groups in PD5k are not protonated. Thus, PD5k is thermoresponsive and displays a LCST behavior with a measured Tc The further repeated addition of CO2/N2 allows to change the protonation state of tertiary amine functions in a complete reversible way without modification of aggregation properties. [20] In comparison, performing such an addition by the alternative addition of HCl and NaOH led to the formation of NaCl. Its presence results in a progressive shift of measured Tc and a modification of aggregation process measured through turbidimetry measurements (Figure S13)

The above investigation on PD homopolymer reveals a strong dependence of thermoresponsive properties upon the protonation degree of polymer chains. In the following we aim at evaluating how the insertion of PD within PN structures affect the thermoresponsiveness of obtained copolymers and how this thermoresponsiveness can be tuned by CO2 addition/removal. For this, copolymers with a constant molecular weight (10k) but different compositions or architectures (statistical and block) will be compared. During bubbling CO2/N2 process, the initial pH value around 10, then decreases to 6 upon CO2 aeration and returns to 8.5 after 30 min N2 treatment. In the case of PN5k-b-PD5k solution, regardless of the initial pH at 10, its pH value switches between 6.0 and 8.5 after cyclically purging CO2 (for 10 min) and N2 (for 30 min) respectively (Figure 5c). In the case of PN2k-b-PD8k and PN8k-b-PD2k, a pH window equal to 6.0 -8.4 and 5.4 -8.4 respectively upon alternating CO2/N2 were measured (Figure S15). These results suggest that CO2-switchable pH change of PN-b-PD solution is fully reversible. [5][6][7] A similar effect could be obtained by successive addition of acid and base but in this case the repeated cycles would lead to a progressive increase of the ionic strength of the solutions and to an alteration of the thermal properties of the polymers. CO2-switchable thermoresponsiveness of P(N-co-D) system was further studied by turbidimetry measurements (Table 2). Initially, without CO2 stimulation, PN and PD blocks are both thermoresponsive with a common Tc equal to 32 °C. From the plot of transmittance vs temperature, only one phase transition temperature was detected whatever copolymer composition or architecture. As shown in Figure 6a, the transmittances of all PN-b-PD block copolymer solutions start to decrease around 37 o C upon heating and they all undergo a soluble-to-insoluble transition in a relatively narrow temperature range of 38 ± 1 o C, suggests that copolymer composition has a slight effect on Tc for block copolymers. This value, higher than the one measured for PN and PD homopolymers, may be related to a cooperative contribution from both blocks triggering thermal phase transition, which has also been reported in the cases of poly(N-isopropylacrylamide)-blockpoly(N-vinylcaprolactam) (PNIPAM-b-PVCL) and P(NIPAM-stat-VCL). [52][53] Interestingly, Tc value for the statistical copolymer P(N5k-stat-D5k) solution is lower than the one measured for the block copolymer PN5k-b-PD5k having a with similar composition, i.e. 31 and 37°C respectively. The copolymer architecture has therefore a strong influence on the cloud point values: the statistical insertion of tertiary amine groups disturbs the interaction between the acrylamide moieties and water, resulting in a lowering of measured Tc.

After exposure to CO2, the pH of polymer solution decreases around 6. Only PN chains remain thermoresponsive, while PD protonated moieties promotes the solubility of whole copolymer in PN5k-b-PD5k. Moreover, the effect of architecture appears to be of primary importance. Indeed, PN5k-b-PD5k remains thermoresponsive, whereas statistical copolymer P(N5k-stat-D5k) loses thermoresponsiveness in the same studied temperature range. After bubbling N2 (Figure 6c), all systems regain their heat-sensitive properties (pH~8.5). However, due to the presence of residual ammonium bicarbonate (protonation degree around 5%), none of the systems can entirely recover to the initial values.

These results indicate that copolymer composition and architecture play a crucial role in CO2tunable phase transition temperature. Moreover, the transition temperature of these copolymers can also be tuned by changing the level of protonation of PD moiety. At low pH the polymer P(N5k-stat-D5k) remains fully soluble and no aggregates can be evidenced. At pH 9.6, light scattering measurement evidences the formation of the large aggregates that quickly precipitates (Figure S16). Therefore, the studies on self-assemblies' properties were only conducted on block copolymers.

At pH~10 and 25°C (T < Tc), PN5k-b-PD5k forms spherical structure with an average diameter of 23.2 ± 5.7 nm as evidenced by TEM images (Figure 7a). SAXS curves indicate the presence of nano-objects with a radius of gyration (Rg) equal to 3.5 ± 1 nm (Figure 8a). Interestingly the Guinier region is followed by a power-law trend I(q)~q - , with  = 1.6 indicating swollen chains in good solvent. [50] These radii of gyration have already been reported for assemblies of amphiphilic PNIPAM described as hairy micelles. [53] A model for star-like polymers fits well our data: by fixing Rg value, the number of arms is found equal to 1.5, indicating the coexistence of star-like nano-objects and free polymer chains. The hydrodynamic radius i.e. 24 ± 5 nm (Figure S17) is in accordance with what found in the literature. [55] When temperature is increased to 60 °C (pH 10), SAXS profile completely changes and large structures are formed in solution (Figure 8a). Indeed, no Guinier region is observed, the signature of the polymeric nature is lost at high-q as the polymer is dehydrated and densely packed and only an extended Porod region with a slope of -4 is present : at a temperature above Tc, both PN and PD chains collapse and become insoluble in water. Spherical aggregates with an average diameter equal to 92.8 ± 34.6 nm and a hydrodynamic diameter equal to 170 ± 40 nm are thus detected by TEM and DLS measurements respectively (Figure 7b and Figure S17). expected for free polymer chains in solution, and a high q trend of chains swollen by the solvent (Figure 8b). A fit using a form factor of star-polymers indicates a low aggregation number (1.5) and coexistence of small star-like micelles and free polymer chains. On heating to 60 °C, the sample gets turbid due to the presence of large spherical aggregates with a diameter equal to 35.1 ± 7.4 nm determined from TEM measurements (Figure 7d), which is significantly smaller than the ones measured prior to the exposure to CO2. Indeed, PN chains collapse upon increasing temperature, whereas protonated PD chains remain hydrated and help to stabilize smaller colloidal structures in solution. These assemblies exhibit larger size than what measured by SAXS technology. We use a model for clusters of polymer chains developed by Hammouda [50] and find a correlation length for the polymer of 1 ± 0.3 nm and a power-law exponent 2.3 ± 0.1 indicating polymers are in semidilute solutions. Interestingly, the polymeric features of the assemblies formed above LCST are not completely lost for this sample, which is not the case for the sample without CO2 stimulation.

Upon 30 min bubbling N2, the system pH returns to 8.5, thermoresponsiveness of PD block is recovered. At 25 °C, the diameter of spheres is almost recovered to the initial size through TEM or DLS observations (23.0 ± 5.0 nm, Figure 7e). At 60 °C, PD shrinks along with the collapse of PN block and spheres with an average diameter of 61.6 ± 13.5 nm in dried state are detected (Figure 7f).

The aggregates obtained show no significant morphological change for a chosen pH and temperature condition after a cooling/heating cycle or after CO2/N2 bubbling cycle (Figure S18 and S19).

Similar trends have been observed concerning the behavior of PN2k-b-PD8k and PN8k-b-PD2k in solution (Figures S20 andS21). The diameter of the aggregates in presence of CO2 at 60 °C seems to decrease significantly with an increase of PD content (Figure 9), this could be related to the ability of the protonated chains of PD to stabilize colloids by electrostatic effect: an increase of their proportion favors the stabilization of colloids with smaller size. The evolution of the hydrodynamic diameters shows the same tendency as those observed in the electron microscopy images (Figure 9). As expected the values of the hydrodynamic diameters are significantly higher than the measurements obtained in a dried state in TEM. Moreover, these high values suggest the presence of polydisperse aggregates in solution.

Conclusions

In this article, the insertion of DEAEAM into PNIPAM structure by Reversible Addition-Fragmentation chain Transfer (RAFT) polymerization was studied and makes it possible to obtain a series of copolymers with various compositions and architectures. CO2 addition/removal induces a reversible protonation/deprotonation transition of DEAEAM units, which results in tunable thermoresponsive properties of the synthesized polymers. For a given composition, the architecture of the copolymer (statistical, block) critically affects the cloud point temperature and the structure of colloids obtained in solution. The statistical copolymer is no longer thermoresponsive upon CO2

exposure, whereas block one with a similar composition keeps its responsiveness, which depends on the protonation degree. Additionally, these results illustrate how it is possible through chemical engineering and the use of CO2 as an innovative and ecological trigger to easily and reversibly modulate the properties (solubility, self-assembly behavior) of these smart materials in aqueous media. [4,5,56]

Scheme 1 .

 1 Scheme 1. Chemical structures of N-substituted poly((meth)acrylamide)s with CO2-

  )-stat-(N,N-(diethylamino)ethyl acrylamide)) (P(NIPAM5kstat-DEAEAM5k)). NIPAM (1.00 g, 8.84 mmol), DEAEAM (1.00 g, 5.87 mmol), AIBN (0.017 g, 0.104 mmol), 4-cyano-4-((dodecylsulfanylthiocarbonyl) sulfanyl) pentanoic acid (CDTPA, 0.084 g, 0.208 mmol), 1,3,5-trioxane (0.053 g, 0.587 mmol, as an internal standard) and 1,4-dioxane (3.23 g) were added into a Schlenk tube under argon flow, then the tube was immersed in a preheated oil bath at 70 o C. After a given time, the polymerization was stopped by rapidly cooling in liquid nitrogen, the desired statistical copolymer was collected by removing solvent, a subsequent precipitation in cold diethyl ether and drying under vacuum. Overall conversion: 98.5%, Mn,theo = 9870 g•mol -1 , Mn,NMR = 9460 g•mol -1 . In DMF (containing 10 mM LiBr): Mn,SEC = 12060 g•mol -1 , Ð = 1.25. In THF (containing 2 vol.% TEA): Mn,SEC = 7490 g•mol -1 , Ð = 1.34. 1 H NMR (500 MHz, D2O) δH (ppm): 3.92 (s, 1H, -CH(CH3)2), 3.33 (s, 2H, -CONH-CH2-), 2.64 (s, 6H, -N(CH2)3), 2.33 -1.31 (m, -CH2CH-CONH-, -CH2CH-CONH-, -C(CN)-CH3)-, -CH2CH2COOH, -CH2CH2COOH), 1.16 (s, 6H, -NHCH(CH3)2), 1.07 (s, 6H, -N(CH2CH3)2), 0.89 (s, 3H, -(CH2)10-CH3).

- 1 .Scheme 3 .

 13 Scheme 3. Synthetic routes for preparation of (a) PDEAEAM homopolymer, (b) PNIPAM-b-

Figure 1 .

 1 Figure 1. (a) 1 H NMR spectrum of P(N5k-stat-D5k) in D2O and (b) SEC traces of PN5k, PN5k-b-

Figure 2 .

 2 Figure 2. pH value and degree of protonation of PD5k in water upon alternately bubbling CO2/N2 ([PD5k] = 0.1 wt.%, gas flow rate: 2 mL•min -1 ).

Figure 3 .

 3 Figure 3. (a) Chemical reaction of PD homopolymer with CO2 in water. (b) 1 H and (c) 13 C NMR spectra of PD5k in D2O recorded at 25 o C upon alternate exposure to CO2/N2 ([PD5k] = 1 wt.%, gas flow rate: 10 mL•min -1 ).

  around 32 o C. After bubbling CO2, the majority of diethylamino groups become protonated, transmittance remains constant around 100% as PD5k solution was heated from 20 to 80 o C, indicating that PD5k is no longer thermoresponsive. Upon N2 treatment, LCST behavior of PD5k is recovered with a higher Tc (65 o C) compared to the value in initial solution, this phenomenon is ascribed to the remaining presence of ammonium bicarbonate.[39,44]

Figure 4 .

 4 Figure 4. Plots of (a) Transmittance and (b) Number-distributed size versus temperature for PD5k

3. 3 .

 3 Reversible CO2/N2-response of PN-b-PD block copolymers. Solubility properties. CO2-responsiveness of PN-b-PD was firstly analysed by 1 H NMR at room temperature. The interaction sites between CO2 and PN5k-b-PD5k are evidenced in Figure 5b. Chemical shifts of -CH2CH2-, -CH2CH2-and -CH2CH3, as well as -CH3 in PD5k block upon 10 min bubbling CO2 move from 3.33, 2.65 and 1.08 ppm to 3.58, 3.28 and 1.33 ppm, then return to 3.43, 2.87 and 1.15 ppm respectively after 30 min N2 aeration. Moreover, no shifts of signals at 3.89 and 1.15 ppm corresponding to -CH(CH3)2 and -CH(CH3)2 in PN5k block are observed during the whole process of gas treatment. Similar phenomena were also detected in the cases of PN2k-b-PD8k and PN8k-b-PD2k (see Figure S14).

Figure 5 .

 5 Figure 5. (a) Chemical reaction of PN-b-PD with CO2 in water. (b) 1 H NMR spectra of PN5k-b-PD5k in D2O recorded at 25 o C before and after exposure to CO2 or N2. (c) pH changes of PN5k-b-PD5k system measured at 25 o C upon seven cycles of alternately bubbling CO2/N2. ([PN5k-b-PD5k] = 1 wt.%, gas flow rate: 10 mL•min -1 , bubbling CO2 and N2 for 10 and 30 min, respectively)

Figure 6 .

 6 Figure 6. Plots of transmittance versus temperature for block and statistical copolymer aqueous

  water. As observed in Figure 6b, the onset points of transmittance in the cases of PN2k-b-PD8k, PN5k-b-PD5k and PN8k-b-PD2k shift to 43, 35 and 30 o C respectively. The insertion of a charged hydrophilic block induces an increase of measured Tc compared to PN homopolymer. Additionally, in the case of PN2k-b-PD8k slightly turbid solutions were obtained upon Tc. This suggests that, during the aggregation process, smaller colloidal structures are formed than for PN8k-b-PD2k and

b

  Tc,ip determined from the inflection point of transmittance curve. c Not observed in the studied temperature range of 20 -70 °C. d Initial pH value of PD5k solution was 9.3. Turbidimetry measurements were performed with a heating rate of 1 o C•min -1 . Gas flow rate was 10 mL•min -1 , 10 and 30 min for bubbling CO2 and N2 respectively. Aggregation properties. The modifications of the behaviour in solution of these polymers induced by changes in temperature are then studied for the different compositions of the synthesized polymers. TEM, DLS and SAXS measurements were carried out to investigate the structure and the size of aggregates.

Figure 7 .

 7 Figure 7. TEM images of PN5k-b-PD5k aggregates formed before, after bubbling CO2 and after bubbling N2 at 25 and 60 o C ([PN5k-b-PD5k] = 0.1 wt.%, gas flow rate: 10 mL•min -1 , 10 and 30 min

Figure 8 .

 8 Figure 8. Small-angle X-ray scattering (SAXS) patterns recorded for 1 wt.% aqueous dispersion of

Figure 9 .Scheme 4 .

 94 Figure 9. TEM images and number-distributed hydrodynamic size of (a, b) PN2k-b-PD8k, (c, d)

Table 1 .

 1 (Co)polymers composition, glass transition temperature and average molecular weights DPN:DPD and Mn,NMR calculated from 1 H NMR spectra by comparing integration area of peak a corresponding to methyl protons of dodecyl end group at 0.88 ppm and those of signals of l and

		Tg a	Mn,NMR a	Mn,SEC c	Mw,SEC c
	(Co)polymer	DPN:DPD a			Ð c
		( o C)	(g•mol -1 )	(g•mol -1 )	(g•mol -1 )

a p at 3.92 and 3.33 ppm, corresponding to PN (peak l) and PD (peak p), respectively. b Tg measured from DSC measurements, heating rate: 10 o C•min -1 , c Mn,SEC, Mw,SEC and Ð determined form SEC analyses in DMF with 10 mM LiBr or in THF containing 2 vol.% TEA (the value obtained in THF is given in parenthesis).

Table 2 .

 2 Measurements of Tc ( o C) for (co)polymers from turbidimetry measurements.

		Initial		After bubbling CO2	After bubbling N2
	(Co)polymer	(pH~10)		(pH~6)	(pH~8.5)
		Tc,onset a	T c,ip	Tc,onset	T c,ip	Tc,onset	T c,ip
	PD5k	30 d	32 d	/ c	/ c	54	65
	PN2k-b-PD8k	38	39	43	/ c	48	/ c
	PN5k-b-PD5k	37	38	35	40	38	41
	PN8k-b-PD2k	35	37	30	34	30	36
	P(N5k-stat-D5k)	31	32	/ c	/ c	56	60
	a Tc,onset determined from temperature where transmittance of copolymer solution starts to decrease.

Acknowledgements

The authors acknowledge CNRS and China Scholarship Council (CSC) for the financial support.

The authors thank P. Roblin for the access to SAXS facilities and B. Payré and D. Goudenèche for TEM access at CMEAB.

Author Contributions

N. Lauth-de Viguerie and J.-D. Marty conceived the idea and supervised this project. F. Yin performed the experiments and wrote the first draft of the paper. B. Lonetti contributed to the SAXS measurement and analyses. All authors participated in evaluating the results and commented on the manuscript.

Conflicts of interest

There are no conflicts to declare.