<commit_before>/* ************************************************************************
 * Copyright 2013 Advanced Micro Devices, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ************************************************************************/


#pragma once
#if !defined( CLFFT_TESTCONSTANTS_H )
#define CLFFT_TESTCONSTANTS_H

#include "clFFT.h"
#include <string>
#include <stdexcept>

//Pre-callback function strings
#define PRE_MULVAL float2 mulval_pre(__global void* in, uint offset, __global void* userdata)\n \
				{ \n \
				float scalar = *((__global float*)userdata + offset); \n \
				float2 ret = *((__global float2*)in + offset) * scalar; \n \
				return ret; \n \
				}

#define PRE_MULVAL_UDT typedef struct USER_DATA  \
					   {  \
						float scalar1;  \
						float scalar2;  \
						} USER_DATA; \n \
					float2 mulval_pre(__global void* in, uint offset, __global void* userdata)\n \
					{ \n \
					__global USER_DATA *data = ((__global USER_DATA *)userdata + offset); \n \
					float scalar = data->scalar1 * data->scalar2; \n \
					float2 ret = *((__global float2*)in + offset) * scalar; \n \
					return ret; \n \
					}

#define PRE_MULVAL_DP double2 mulval_pre(__global void* in, uint offset, __global void* userdata)\n \
				{ \n \
				double scalar = *((__global double*)userdata + offset); \n \
				double2 ret = *((__global double2*)in + offset) * scalar; \n \
				return ret; \n \
				}

#define PRE_MULVAL_PLANAR float2 mulval_pre(__global void* inRe, __global void* inIm, uint offset, __global void* userdata)\n \
				{ \n \
				float scalar = *((__global float*)userdata + offset); \n \
				float2 ret; \n \
				ret.x = *((__global float*)inRe + offset) * scalar; \n \
				ret.y = *((__global float*)inIm + offset) * scalar; \n \
				return ret; \n \
				}

#define PRE_MULVAL_PLANAR_DP double2 mulval_pre(__global void* inRe, __global void* inIm, uint offset, __global void* userdata)\n \
				{ \n \
				double scalar = *((__global double*)userdata + offset); \n \
				double2 ret; \n \
				ret.x = *((__global double*)inRe + offset) * scalar; \n \
				ret.y = *((__global double*)inIm + offset) * scalar; \n \
				return ret; \n \
				}

#define PRE_MULVAL_REAL float mulval_pre(__global void* in, uint offset, __global void* userdata)\n \
				{ \n \
				float scalar = *((__global float*)userdata + offset); \n \
				float ret = *((__global float*)in + offset) * scalar; \n \
				return ret; \n \
				}

#define PRE_MULVAL_REAL_DP double mulval(__global void* in, uint offset, __global void* userdata)\n \
				{ \n \
				double scalar = *((__global double*)userdata + offset); \n \
				double ret = *((__global double*)in + offset) * scalar; \n \
				return ret; \n \<commit_msg>Callback - Fix the precallback function name in the constants file<commit_after>/* ************************************************************************
 * Copyright 2013 Advanced Micro Devices, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ************************************************************************/


#pragma once
#if !defined( CLFFT_TESTCONSTANTS_H )
#define CLFFT_TESTCONSTANTS_H

#include "clFFT.h"
#include <string>
#include <stdexcept>

//Pre-callback function strings
#define PRE_MULVAL float2 mulval_pre(__global void* in, uint offset, __global void* userdata)\n \
				{ \n \
				float scalar = *((__global float*)userdata + offset); \n \
				float2 ret = *((__global float2*)in + offset) * scalar; \n \
				return ret; \n \
				}

#define PRE_MULVAL_UDT typedef struct USER_DATA  \
					   {  \
						float scalar1;  \
						float scalar2;  \
						} USER_DATA; \n \
					float2 mulval_pre(__global void* in, uint offset, __global void* userdata)\n \
					{ \n \
					__global USER_DATA *data = ((__global USER_DATA *)userdata + offset); \n \
					float scalar = data->scalar1 * data->scalar2; \n \
					float2 ret = *((__global float2*)in + offset) * scalar; \n \
					return ret; \n \
					}

#define PRE_MULVAL_DP double2 mulval_pre(__global void* in, uint offset, __global void* userdata)\n \
				{ \n \
				double scalar = *((__global double*)userdata + offset); \n \
				double2 ret = *((__global double2*)in + offset) * scalar; \n \
				return ret; \n \
				}

#define PRE_MULVAL_PLANAR float2 mulval_pre(__global void* inRe, __global void* inIm, uint offset, __global void* userdata)\n \
				{ \n \
				float scalar = *((__global float*)userdata + offset); \n \
				float2 ret; \n \
				ret.x = *((__global float*)inRe + offset) * scalar; \n \
				ret.y = *((__global float*)inIm + offset) * scalar; \n \
				return ret; \n \
				}

#define PRE_MULVAL_PLANAR_DP double2 mulval_pre(__global void* inRe, __global void* inIm, uint offset, __global void* userdata)\n \
				{ \n \
				double scalar = *((__global double*)userdata + offset); \n \
				double2 ret; \n \
				ret.x = *((__global double*)inRe + offset) * scalar; \n \
				ret.y = *((__global double*)inIm + offset) * scalar; \n \
				return ret; \n \
				}

#define PRE_MULVAL_REAL float mulval_pre(__global void* in, uint offset, __global void* userdata)\n \
				{ \n \
				float scalar = *((__global float*)userdata + offset); \n \
				float ret = *((__global float*)in + offset) * scalar; \n \
				return ret; \n \
				}

#define PRE_MULVAL_REAL_DP double mulval_pre(__global void* in, uint offset, __global void* userdata)\n \
				{ \n \
				double scalar = *((__global double*)userdata + offset); \n \
				double ret = *((__global double*)in + offset) * scalar; \n \
				return ret; \n \
{'fraction_non_alphanumeric': 0.16490906312089257, 'fraction_numerical': 0.007641754546843955, 'mean_word_length': 3.1313131313131315, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5801509', 'n_tokens_mistral': 2392, 'n_tokens_neox': 2067, 'n_words': 679}