Linux Kernel-CPU Cache and Memory Barrier

1. CPU cache The origin of cpu cache In all instruction fetch cycles of the CPU (program calculation), the memory needs to be accessed at least once (that is, what we call data on physical memory) It usually requires multiple accesses to the memory to fetch operands or save results. The speed of CPU processing […]

Pointer(2) – pointer in array

Summary of insights into programming learning, Record every moment of struggle, I hope it can help you who are also working hard! If there are any shortcomings, please correct me! Learn and communicate together! Welcome everyone → Like + Collection? + Leave a message? Since we have chosen a distant place, we only care about […]

[C++] Non-type template parameters | array container | template specialization | why templates cannot be compiled separately

Table of Contents 1. Non-type template parameters 2. array container 3. Template specialization Why specialize templates? Function template specialization Add a question Class template specialization Full specialization and partial specialization Fully specialized partial specialization 4. Why templates cannot be compiled separately Why what to do 5. Summarize the advantages and disadvantages of templates 1. Non-type […]

SolvedValueError: Found array with dim 4. TSNE expected <= 2.

Problem description Traceback (most recent call last): File “/home/visionx/nickle/temp/SimCLR/linear_evaluation.py”, line 229, in ).fit_transform(all_nodes_unnormalized_scores) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/visionx/anaconda3/envs/simclr-pt/lib/python3.11/site-packages/sklearn/utils/_set_output.py”, line 157, in wrapped data_to_wrap = f(self, X, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/visionx/anaconda3/envs/simclr-pt/lib/python3.11/site-packages/sklearn/base.py”, line 1152, in wrapper return fit_method(estimator, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/visionx/anaconda3/envs/simclr-pt/lib/python3.11/site-packages/sklearn/manifold/_t_sne.py”, line 1111, in fit_transform embedding = self._fit(X) ^^^^^^^^^^^^ File “/home/visionx/anaconda3/envs/simclr-pt/lib/python3.11/site-packages/sklearn/manifold/_t_sne.py”, line 841, in _fit X […]

The underlying principle of ArrayList

1. Data structure of ArrayList The underlying data structure of ArrayList is an array. The type of array elements is Object type. All operations on ArrayList are based on arrays. 2. Thread safety of ArrayList The operation of adding elements to ArrayList is carried out in two steps, that is, the first step is to […]

C language – array explanation

The concept of array What is an array? An array is a collection of elements of the same type. We can know from the concept: ? The array stores one or more data, but the number of array elements cannot be 0. ? Multiple data stored in the array have the same type. Arrays are […]

[Array method reduce] Details of reduce and simulation rewriting of other array extension methods

Learn key phrases: Array.reduce Array.prototype.reduce reduce method Override reduce method 1. Write in front Many students (referring to myself) have no difficulty in learning other array expansion methods, but when it comes to the reduce method, they will appear stupid, so today I will quickly explain this method clearly. In fact, all array expansion methods […]

Golang standard library: bytes package – byte slice byte array convenient operation

2.2 bytes – byte slice convenient operation This package defines some convenience operations for manipulating byte slices. Because strings can be represented as []byte, the functions and methods defined by the bytes package are very similar to the strings package, so the explanation will be similar to the strings package and can even be referred […]